Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sbin install dir configurable #1028

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:

- name: Install RPMs
run: |
docker exec jss bash -c "dnf localinstall -y build/RPMS/*.rpm"
docker exec jss bash -c "dnf install -y build/RPMS/*.rpm"

- name: Build with Maven
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Install packages
run: |
docker cp /tmp/RPMS/. jss:/root/RPMS/
docker exec jss bash -c "dnf localinstall -y /root/RPMS/*"
docker exec jss bash -c "dnf install -y /root/RPMS/*"

- name: Create postgresql certificates
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pki-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
docker exec pki git clone -b master https://github.com/$NAMESPACE/pki
docker exec pki dnf builddep -y --skip-unavailable --spec pki/pki.spec
docker cp /tmp/RPMS/. pki:/root/RPMS/
docker exec pki bash -c "dnf localinstall -y /root/RPMS/*"
docker exec pki bash -c "dnf install -y /root/RPMS/*"

- name: Build and install PKI
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pki-ca-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ jobs:
run: |
# install packages on server
docker cp /tmp/RPMS/. pki:/root/RPMS/
docker exec pki bash -c "dnf localinstall -y /root/RPMS/*"
docker exec pki bash -c "dnf install -y /root/RPMS/*"

# install packages on client1
docker cp /tmp/RPMS/. client1:/root/RPMS/
docker exec client1 bash -c "dnf localinstall -y /root/RPMS/*"
docker exec client1 bash -c "dnf install -y /root/RPMS/*"

# install packages on client2
docker cp /tmp/RPMS/. client2:/root/RPMS/
docker exec client2 bash -c "dnf localinstall -y /root/RPMS/*"
docker exec client2 bash -c "dnf install -y /root/RPMS/*"

- name: Install CA
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pki-tools-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Install packages
run: |
docker cp /tmp/RPMS/. pki:/root/RPMS/
docker exec pki bash -c "dnf localinstall -y /root/RPMS/*"
docker exec pki bash -c "dnf install -y /root/RPMS/*"

- name: Create HSM token
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pki-tps-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Install packages
run: |
docker cp /tmp/RPMS/. pki:/root/RPMS/
docker exec pki bash -c "dnf localinstall -y /root/RPMS/*"
docker exec pki bash -c "dnf install -y /root/RPMS/*"

- name: Install CA
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tomcat-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Install packages
run: |
docker cp /tmp/RPMS/. server:/root/RPMS/
docker exec server bash -c "dnf localinstall -y /root/RPMS/*"
docker exec server bash -c "dnf install -y /root/RPMS/*"

- name: Create Tomcat
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ FROM jss-deps AS jss-runner
COPY --from=jss-dist /root/RPMS /tmp/RPMS/

# Install JSS packages
RUN dnf localinstall -y /tmp/RPMS/* \
RUN dnf install -y /tmp/RPMS/* \
&& dnf clean all \
&& rm -rf /var/cache/dnf \
&& rm -rf /tmp/RPMS
Expand Down
11 changes: 9 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if [ "$HOSTTYPE" = "x86_64" ]; then
else
LIB_DIR="/usr/lib"
fi
SBIN_DIR="/usr/sbin"

SYSCONF_DIR="/etc"
SHARE_DIR="/usr/share"
Expand Down Expand Up @@ -57,6 +58,7 @@ usage() {
echo " --prefix-dir=<path> Prefix directory (default: $PREFIX_DIR)."
echo " --include-dir=<path> Include directory (default: $INCLUDE_DIR)."
echo " --lib-dir=<path> Library directory (default: $LIB_DIR)."
echo " --sbin-dir=<path> Superuser binary directory (default: $SBIN_DIR)"
echo " --sysconf-dir=<path> System configuration directory (default: $SYSCONF_DIR)."
echo " --share-dir=<path> Share directory (default: $SHARE_DIR)."
echo " --cmake=<path> Path to CMake executable"
Expand Down Expand Up @@ -217,6 +219,9 @@ while getopts v-: arg ; do
lib-dir=?*)
LIB_DIR=$(readlink -f "$LONG_OPTARG")
;;
sbin-dir=?*)
SBIN_DIR=$(readlink -f "$LONG_OPTARG")
;;
sysconf-dir=?*)
SYSCONF_DIR=$(readlink -f "$LONG_OPTARG")
;;
Expand Down Expand Up @@ -282,8 +287,8 @@ while getopts v-: arg ; do
'')
break # "--" terminates argument processing
;;
name* | work-dir* | prefix-dir* | include-dir* | lib-dir* | sysconf-dir* | share-dir* | cmake* | \
java-home* | jni-dir* | install-dir* | \
name* | work-dir* | prefix-dir* | include-dir* | lib-dir* | sbin-dir* | sysconf-dir* | share-dir* | \
cmake* | java-home* | jni-dir* | install-dir* | \
source-tag* | spec* | version* | release* | dist*)
echo "ERROR: Missing argument for --$OPTARG option" >&2
exit 1
Expand Down Expand Up @@ -319,6 +324,7 @@ if [ "$DEBUG" = true ] ; then
echo "PREFIX_DIR: $PREFIX_DIR"
echo "INCLUDE_DIR: $INCLUDE_DIR"
echo "LIB_DIR: $LIB_DIR"
echo "SBIN_DIR: $SBIN_DIR"
echo "SYSCONF_DIR: $SYSCONF_DIR"
echo "SHARE_DIR: $SHARE_DIR"
echo "CMAKE: $CMAKE"
Expand Down Expand Up @@ -376,6 +382,7 @@ if [ "$BUILD_TARGET" = "dist" ] ; then

OPTIONS+=(-DINCLUDE_INSTALL_DIR:PATH="$INCLUDE_DIR")
OPTIONS+=(-DLIB_INSTALL_DIR:PATH="$LIB_DIR")
OPTIONS+=(-DSBIN_INSTALL_DIR:PATH="$SBIN_DIR")
OPTIONS+=(-DSYSCONF_INSTALL_DIR:PATH="$SYSCONF_DIR")
OPTIONS+=(-DSHARE_INSTALL_PREFIX:PATH="$SHARE_DIR")

Expand Down
Loading