-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdosh.spec
More file actions
170 lines (138 loc) · 5.49 KB
/
dosh.spec
File metadata and controls
170 lines (138 loc) · 5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
Name: dosh
Version: 9
Release: 1
Summary: Run a user shell in a container with working directory bind mounted
License: LGPL-2.1-or-later
URL: https://github.com/gportay/%{name}
Source0: https://github.com/gportay/%{name}/archive/%{version}.tar.gz
BuildArch: noarch
BuildRequires: asciidoctor
BuildRequires: make
BuildRequires: shellcheck
BuildRequires: pkgconfig(bash-completion)
Requires: bash
Requires: docker
%description
dosh(1) is an sh-compatible front-end for docker that runs commands in a new
container; using the current user, with working directory bind mounted.
%global debug_package %{nil}
%package posh
Requires: dosh
Requires: podman
Summary: Run a user shell in a container with working directory bind mounted
%description posh
posh(1) is an sh-compatible front-end for podman that runs commands in a new
container; using the current user, with working directory bind mounted.
%package cqfd
Requires: dosh
Summary: Wrap commands in controlled Docker containers using dosh
%description cqfd
Wrap commands in controlled Docker containers using dosh.
cqfd provides a quick and convenient way to run commands in the current
directory, but within a Docker container defined in a per-project config file.
%prep
%setup -q
%check
make check
%build
%make_build cqfd.1.gz cqfdrc.5.gz dosh.1.gz
%install
%make_install PREFIX=/usr DOCKERLIBDIR=%{_libdir}/docker install-all install-cqfd install-docker-cli-plugin-sh install-docker-cli-plugin-bash install-docker-cli-plugin-zsh install-docker-cli-plugin-cqfd install-linux-platforms
%post
_libdir=$(rpm --eval '%%{_libdir}')
mkdir -p "$_libdir/docker/cli-plugins"
ln -sf ../../../../..%{_dockerlibdir}/cli-plugins/docker-bash "$_libdir/docker/cli-plugins/docker-bash"
ln -sf ../../../../..%{_dockerlibdir}/cli-plugins/docker-sh "$_libdir/docker/cli-plugins/docker-sh"
ln -sf ../../../../..%{_dockerlibdir}/cli-plugins/docker-shell "$_libdir/docker/cli-plugins/docker-shell"
ln -sf ../../../../..%{_dockerlibdir}/cli-plugins/docker-zsh "$_libdir/docker/cli-plugins/docker-zsh"
%preun
_libdir=$(rpm --eval '%%{_libdir}')
rm -f "$_libdir/docker/cli-plugins/docker-bash"
rm -f "$_libdir/docker/cli-plugins/docker-sh"
rm -f "$_libdir/docker/cli-plugins/docker-shell"
rm -f "$_libdir/docker/cli-plugins/docker-zsh"
%post cqfd
_libdir=$(rpm --eval '%%{_libdir}')
mkdir -p "$_libdir/docker/cli-plugins"
ln -sf ../../../../..%{_dockerlibdir}/cli-plugins/docker-cqfd "$_libdir/docker/cli-plugins/docker-cqfd"
%preun cqfd
_libdir=$(rpm --eval '%%{_libdir}')
rm -f "$_libdir/docker/cli-plugins/docker-cqfd"
%files
%license LICENSE
%doc README.md
%{_bindir}/dosh
%{_datadir}/bash-completion/completions/dosh
%{_datadir}/dosh/docker/buildroot/Dockerfile
%{_datadir}/dosh/docker/deb/Dockerfile
%{_datadir}/dosh/docker/kas/Dockerfile
%{_datadir}/dosh/docker/pkg/Dockerfile
%{_datadir}/dosh/docker/rpm/Dockerfile
%{_datadir}/dosh/docker/ubuntu/Dockerfile
%{_datadir}/dosh/docker/yocto/Dockerfile
%{_datadir}/dosh/rc.d/git.rc
%{_datadir}/dosh/rc.d/history.rc
%{_datadir}/dosh/rc.d/shell.rc
%{_datadir}/dosh/rc.d/ssh-agent.rc
%{_datadir}/dosh/rc.d/ssh.rc
%{_datadir}/dosh/rc.d/x11.rc
%{_datadir}/dosh/support/cqfd
%{_datadir}/dosh/support/doshx
%{_datadir}/dosh/support/dot-profile
%{_datadir}/dosh/support/posh
%{_datadir}/dosh/support/profile.sh
%{_datadir}/dosh/support/sedosh
%{_datadir}/dosh/support/zdosh
%{_datadir}/man/man1/dosh.1.gz
%{_dockerlibdir}/cli-plugins/docker-bash
%{_dockerlibdir}/cli-plugins/docker-sh
%{_dockerlibdir}/cli-plugins/docker-shell
%{_dockerlibdir}/cli-plugins/docker-zsh
%{_exec_prefix}/lib/dosh/bin/linux-amd64-dosh
%{_exec_prefix}/lib/dosh/bin/linux-arm-dosh
%{_exec_prefix}/lib/dosh/bin/linux-arm-v6-dosh
%{_exec_prefix}/lib/dosh/bin/linux-arm-v7-dosh
%{_exec_prefix}/lib/dosh/bin/linux-arm64-dosh
%{_exec_prefix}/lib/dosh/bin/linux-ppc64le-dosh
%{_exec_prefix}/lib/dosh/bin/linux-riscv64-dosh
%{_exec_prefix}/lib/dosh/bin/linux-s390x-dosh
%files cqfd
%{_bindir}/cqfd
%{_datadir}/man/man1/cqfd.1.gz
%{_datadir}/man/man5/cqfdrc.5.gz
%{_dockerlibdir}/cli-plugins/docker-cqfd
%changelog
* Mon Jan 12 2026 Gaël PORTAY <gael.portay@gmail.com> - 9-1
- Fix cqfd's CQFD_NO_USER_GIT_CONFIG environment.
- Output commands to stderr if --verbose.
- Prints raw build process on verbose.
- Add cqfd's verbose option.
- Fix cqfd's quiet option.
- Optionize cqfd's release command.
- Add cqfd's deinit command.
- Add cqfd's ls command.
- Add cqfd's gc command.
- Store cached images by backend.
- Add Running status.
- Do not collect image with a running container.
- Do not remove running image.
- Output garbage collected details.
- Add --cache-directory option.
- Build image from Dockerfile's parent directory.
- Output note if ADD or COPY instructions and if no .dockerignore file.
- Handle exec form instruction parameters.
- Add --rc option.
* Fri Aug 01 2025 Gaël PORTAY <gael.portay@gmail.com> - 8-1
- Add cqfd man pages.
- Remove non-portable splitting hashbang single argument.
- Fix relative path with --working-directory option.
- Fix mapping path to dosh in container.
- Add --platform option and DOSH_PLATFORM environment to support multi-platform.
- Fix collecting unused images.
- Describe --tag, --ls, --rmi, and --gc options in man page.
- Describe Untracked, Deleted, Outdated, and Ready image status in man page.
- Add Untracked and internal Unknown status.
- Remove "tag-redondant" CHECKSUM column.
- Add --parent option to bind mount parent directory.
* Tue Jul 01 2025 Gaël PORTAY <gael.portay@gmail.com> - 7-1
- Initial release.