Skip to content

Commit

Permalink
Merge pull request #27 from ggtakec/fix_update
Browse files Browse the repository at this point in the history
Updated tool scripts and support OSs
  • Loading branch information
ggtakec authored Sep 1, 2023
2 parents 9969ee1 + b2473d8 commit fc9ea14
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ jobs:
- ubuntu:22.04
- ubuntu:20.04
- ubuntu:18.04
- debian:bookworm
- debian:bullseye
- debian:buster
- centos:centos7
- rockylinux:9
- rockylinux:8
- centos:centos7
- fedora:37
- fedora:36
- alpine:3.17
- alpine:3.18

container:
image: ${{ matrix.container }}
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/ostypevars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,20 @@ elif [ "${CI_OSTYPE}" = "ubuntu:18.04" ] || [ "${CI_OSTYPE}" = "ubuntu:bionic" ]
PKG_EXT="deb"
IS_OS_UBUNTU=1

elif [ "${CI_OSTYPE}" = "debian:12" ] || [ "${CI_OSTYPE}" = "debian:bookworm" ]; then
DIST_TAG="debian/bookworm"
INSTALL_PKG_LIST="git autoconf autotools-dev make dh-make fakeroot dpkg-dev devscripts pkg-config ruby-dev rubygems rubygems-integration procps"
INSTALLER_BIN="apt-get"
UPDATE_CMD="update"
UPDATE_CMD_ARG=""
INSTALL_CMD="install"
INSTALL_CMD_ARG=""
INSTALL_AUTO_ARG="-y"
INSTALL_QUIET_ARG="-qq"
PKG_OUTPUT_DIR="debian_build"
PKG_EXT="deb"
IS_OS_DEBIAN=1

elif [ "${CI_OSTYPE}" = "debian:11" ] || [ "${CI_OSTYPE}" = "debian:bullseye" ]; then
DIST_TAG="debian/bullseye"
INSTALL_PKG_LIST="git autoconf autotools-dev make dh-make fakeroot dpkg-dev devscripts pkg-config ruby-dev rubygems rubygems-integration procps"
Expand Down Expand Up @@ -229,8 +243,8 @@ elif [ "${CI_OSTYPE}" = "fedora:36" ]; then
PKG_EXT="rpm"
IS_OS_FEDORA=1

elif [ "${CI_OSTYPE}" = "alpine:3.17" ]; then
DIST_TAG="alpine/v3.17"
elif [ "${CI_OSTYPE}" = "alpine:3.18" ]; then
DIST_TAG="alpine/v3.18"
INSTALL_PKG_LIST="bash sudo alpine-sdk automake autoconf util-linux-misc musl-locales ruby-dev procps coreutils k2hr3-cli"
INSTALLER_BIN="apk"
UPDATE_CMD="update"
Expand Down
8 changes: 4 additions & 4 deletions buildutils/make_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ elif [ "${PRGMODE}" = "DEBHELPER" ]; then
# That string is depended debhelper package version and os etc.
# (if not ubuntu/debian os, returns default string)
#
OS_ID_STRING=$(grep '^ID[[:space:]]*=[[:space:]]*' /etc/os-release | sed -e 's|^ID[[:space:]]*=[[:space:]]*||g' -e 's|^[[:space:]]*||g' -e 's|[[:space:]]*$||g')
OS_ID_STRING=$(grep '^ID[[:space:]]*=[[:space:]]*' /etc/os-release | sed -e 's|^ID[[:space:]]*=[[:space:]]*||g' -e 's|^[[:space:]]*||g' -e 's|[[:space:]]*$||g' -e 's|"||g')

DEBHELPER_MAJOR_VER=$(apt-cache show debhelper 2>/dev/null | grep Version 2>/dev/null | awk '{print $2}' 2>/dev/null | sed -e 's/\..*/ /g' 2>/dev/null)

Expand All @@ -220,10 +220,10 @@ elif [ "${PRGMODE}" = "DEBHELPER" ]; then
fi

if [ -n "${OS_ID_STRING}" ]; then
if [ "${OS_ID_STRING}" = "debian" ]; then
if echo "${OS_ID_STRING}" | grep -q -i "debian"; then
RESULT="debhelper (>= 9.20160709)${DEB_WITH_SYSTEMD_STRING}, autotools-dev"

elif [ "${OS_ID_STRING}" = "ubuntu" ]; then
elif echo "${OS_ID_STRING}" | grep -q -i "ubuntu"; then
if [ "${DEBHELPER_MAJOR_VER}" -lt 10 ]; then
RESULT="debhelper (>= 9.20160709)${DEB_WITH_SYSTEMD_STRING}, autotools-dev"
else
Expand All @@ -243,7 +243,7 @@ elif [ "${PRGMODE}" = "RPMGROUP" ]; then
# Fedora rpm does not need "Group" key in spec file.
# If not fedora, returns "NEEDRPMGROUP", and you must replace this string in configure.ac
#
if grep -q '^ID[[:space:]]*=[[:space:]]*["]*fedora["]*[[:space:]]*$' /etc/os-release; then
if grep -q -i '^ID[[:space:]]*=[[:space:]]*["]*fedora["]*[[:space:]]*$' /etc/os-release; then
RESULT=""
else
RESULT="NEEDRPMGROUP"
Expand Down

0 comments on commit fc9ea14

Please sign in to comment.