Skip to content

Commit

Permalink
Use /usr/libin stead of /etc to satisfy rpmlint
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-suse committed Nov 27, 2023
1 parent 5bf7c41 commit e9043f3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
install:
mkdir -p "${DESTDIR}"/usr/bin/
install bin/environ "${DESTDIR}"/usr/bin/
install -d -m 0755 "${DESTDIR}"/etc/environ.d/
install -d -m 0755 "${DESTDIR}"/usr/share/environ.d/
cd product && for d in * ; do \
mkdir -p "${DESTDIR}"/etc/environ.d/$$d ;\
mkdir -p "${DESTDIR}"/usr/share/environ.d/$$d ;\
for f in $$d/*.{m4,cnf} ; do \
test -f $$f && install -m 0644 $$f "${DESTDIR}"/etc/environ.d/$$f ;\
test -f $$f && install -m 0644 $$f "${DESTDIR}"/usr/share/environ.d/$$f ;\
done ;\
for dd in $$d/* ; do \
test -d $$dd || continue ;\
for f in $$dd/*.m4 ; do \
test -f $$f || continue ;\
mkdir -p "${DESTDIR}"/etc/environ.d/$$dd ;\
install -m 0644 $$f "${DESTDIR}"/etc/environ.d/$$f ;\
mkdir -p "${DESTDIR}"/usr/share/environ.d/$$dd ;\
install -m 0644 $$f "${DESTDIR}"/usr/share/environ.d/$$f ;\
done \
done \
done
Expand Down
14 changes: 5 additions & 9 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#!/bin/bash
[ ! -e environ_env ] || source environ_env

usage () {
cat <<'HELP_USAGE'
Usage: environ [--rebuild 0] [--build 0] [--local 0] [--cachedir <0|path>] \
[--dir <path>] [-l|--localdir <path>] <product> [<path>]

Expand All @@ -23,12 +18,13 @@ environ - generate a folder with helper scripts to manage and automate services
folder will be created.
--cachedir <path> - use <path> for cache directory location (default is
/temp/environ/)
--dir <path> - path to templates (default /etc/environ.d/).
--dir <path> - path to templates (default /usr/share/environ.d/).
-l <path>,
--localdir <path> - additional path to templates (default t/lib/environ/).
<product> - a service for which scripts will be generated. Currently
supported values are names of folders in --tempatedir parameter (default
/etc/environ/product). <product> may be also followed by a digit if more
than one service is needed.
supported values are names of folders in --tempatedir parameter (default
/usr/share/environ.d/product). <product> may be also followed by a digit if
more than one service is needed.
<path> - if specified, must point to a folder with source codes of the
desired product. In this case templates (when available) will actually
build the product from source, (unless --build option is set to 0).
Expand Down
8 changes: 4 additions & 4 deletions bin/environ
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ environ - generate a folder with helper scripts to manage and automate services
folder will be created.
--cachedir <path> - use <path> for cache directory location (default is
/temp/environ/)
--dir <path> - path to templates (default /etc/environ.d/).
--dir <path> - path to templates (default /usr/share/environ.d/).
-l <path>,
--localdir <path> - additional path to templates (default t/lib/environ/).
<product> - a service for which scripts will be generated. Currently
supported values are names of folders in --tempatedir parameter (default
/etc/environ/product). <product> may be also followed by a digit if more
than one service is needed.
/usr/share/environ.d/product). <product> may be also followed by a digit if
more than one service is needed.
<path> - if specified, must point to a folder with source codes of the
desired product. In this case templates (when available) will actually
build the product from source, (unless --build option is set to 0).
Expand Down Expand Up @@ -111,7 +111,7 @@ HELP_USAGE
[ ! -z "$USER" ] || export USER=$(whoami)

set -euo pipefail
: "${ENVIRON_DIR:=/etc/environ.d}"
: "${ENVIRON_DIR:=/usr/share/environ.d}"
: "${ENVIRON_LOCAL_DIR:=t/lib/environ}"
: "${ENVIRON_CACHE:=/tmp/environ}"
: "${ENVIRON_REBUILD:=1}"
Expand Down
1 change: 0 additions & 1 deletion t/lib/test-in-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ docker_info="$(docker info >/dev/null 2>&1)" || {

echo 'FROM '$ENVIRON_TEST_IMAGE'
RUN echo 01 # change this if you want rebuild of container
RUN [ ! -d /etc/zypp ] || sed -i 's,http://,https://,g' /etc/zypp/repos.d/*.repo
ADD environ_print_install* /
RUN bash -x -c "$(/environ_print_install.sh || exit 1)"
RUN [ -z "'$packages'" ] || bash -x -c "$(/environ_print_install.sh '$packages' || exit 1)"
Expand Down

0 comments on commit e9043f3

Please sign in to comment.