Skip to content

Commit

Permalink
meson: install all binaries in $PREFIX/bin
Browse files Browse the repository at this point in the history
Most distros are now merging /usr/sbin into /usr/bin. Let's not make it
more confusing by installing in /usr/sbin upstream and have a different
install location when packaged downstream.

This has the benefit of fixing packaging on Fedora which recently
changed their %{_sbindir} macro to point to /usr/bin. Unfortunately, the
install_dir in meson.build was wrongfully set to explicit 'sbin' instead
of get_option('sbindir').

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2340579
Link: https://koji.fedoraproject.org/koji/taskinfo?taskID=127983504
Link: https://fedoraproject.org/wiki//Changes/Unify_bin_and_sbin
Signed-off-by: Robin Jarry <[email protected]>
  • Loading branch information
rjarry committed Jan 24, 2025
1 parent c6ec1db commit cd843af
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@
/*.rpm
/.cache
/build
/debian/*.debhelper
/debian/*.debhelper.log
/debian/*.substvars
/debian/.*
/debian/changelog
/debian/debhelper*
/debian/files
/debian/grout-dev/
/debian/grout/
/debian/tmp/
/redhat-linux-build
/subprojects/dpdk
/subprojects/ecoli
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RUN rm -f /tmp/grout-debug*.rpm
RUN dnf -y install --nodocs --setopt=install_weak_deps=0 /tmp/grout*.rpm
RUN dnf -y --enablerepo='*' clean all
RUN rm -f /tmp/grout*.rpm
CMD ["/usr/sbin/grout"]
CMD ["/usr/bin/grout"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ systemctl restart grout.service
Memory: 6.6M
CPU: 19.185s
CGroup: /system.slice/grout.service
└─31299 /usr/sbin/grout
└─31299 /usr/bin/grout

Nov 30 10:31:31 grout systemd[1]: Starting Graph router daemon...
Nov 30 10:31:31 grout grout[31299]: GROUT: main: starting grout version v0.2-93-gf53240e3750a
Expand Down
2 changes: 0 additions & 2 deletions debian/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion debian/grout.install
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/etc/default/grout
/etc/grout.init
/usr/bin/grcli
/usr/sbin/grout
/usr/bin/grout
/usr/share/man/man1/grcli.1
/usr/share/man/man8/grout.8
2 changes: 1 addition & 1 deletion main/grout.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Type=notify
Restart=on-failure
EnvironmentFile=-/etc/default/grout
ExecStartPre=/usr/bin/udevadm settle
ExecStart=/usr/sbin/grout $GROUT_OPTS
ExecStart=/usr/bin/grout $GROUT_OPTS
ExecStartPost=/usr/bin/grcli -xef /etc/grout.init

[Install]
Expand Down
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ grout_exe = executable(
dependencies: [dpdk_dep, ev_core_dep, ev_thread_dep, numa_dep],
c_args: ['-D__GROUT_MAIN__'],
install: true,
install_dir: 'sbin',
)

grcli_exe = executable(
Expand Down
2 changes: 1 addition & 1 deletion rpm/grout.spec
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ rm -rf %{buildroot} %{_vpath_builddir}
%attr(644, root, root) %{_datadir}/bash-completion/completions/grout
%attr(644, root, root) %{_datadir}/bash-completion/completions/grcli
%attr(755, root, root) %{_bindir}/grcli
%attr(755, root, root) %{_sbindir}/grout
%attr(755, root, root) %{_bindir}/grout
%attr(644, root, root) %{_mandir}/man1/grcli.1*
%attr(644, root, root) %{_mandir}/man8/grout.8*

Expand Down

0 comments on commit cd843af

Please sign in to comment.