diff --git a/openeuler/openeuler/24.03-lts/Dockerfile b/openeuler/openeuler/24.03-lts/Dockerfile deleted file mode 100644 index b2b98f2..0000000 --- a/openeuler/openeuler/24.03-lts/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -From scratch -MAINTAINER zhangwenlong@loongson.cn -ADD openEuler-24.03.rootfs.loongarch64.tar.gz / -CMD ["/bin/bash"] diff --git a/openeuler/openeuler/24.03-lts/Makefile b/openeuler/openeuler/24.03-lts/Makefile deleted file mode 100644 index 1172aff..0000000 --- a/openeuler/openeuler/24.03-lts/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# This file is generated by the template. - -REGISTRY ?=lcr.loongnix.cn -ORGANIZATION ?=openeuler -REPOSITORY ?=openeuler -TAG ?=24.03-LTS -LATEST ?=true - -IMAGE=$(REGISTRY)/$(ORGANIZATION)/$(REPOSITORY):$(TAG) -LATEST_IMAGE=$(REGISTRY)/$(ORGANIZATION)/$(REPOSITORY):latest - -default: image - -rootfs: - bash mkimage-rootfs-openeuler.sh -image: rootfs - docker build \ - --build-arg http_proxy=$(http_proxy) \ - --build-arg https_proxy=$(https_proxy) \ - -t $(IMAGE) \ - . - -push: - docker push $(IMAGE) - #latest image - @if [ $(LATEST) = "true" ]; \ - then \ - docker tag $(IMAGE) $(LATEST_IMAGE); \ - docker push $(LATEST_IMAGE); \ - fi diff --git a/openeuler/openeuler/24.03-lts/mkimage-rootfs-openeuler.sh b/openeuler/openeuler/24.03-lts/mkimage-rootfs-openeuler.sh deleted file mode 100755 index 0837c19..0000000 --- a/openeuler/openeuler/24.03-lts/mkimage-rootfs-openeuler.sh +++ /dev/null @@ -1,170 +0,0 @@ -#!/bin/sh -# -# for openEuler 24.03 -# create rootfs.tar from repository -# -#set -x - -set -e - -arch=loongarch64 -#release=$1 -releasever=24.03 -version=24.03 -if [ -z $version ] -then - echo "releasever or version is empty!!!" - exit 1 -fi - -output="openEuler-${version}.rootfs.${arch}.tar.gz" - -repos_baseos_url="https://eulermaker.compass-ci.openeuler.openatom.cn/api/ems3/repositories/openEuler-24.03-LTS-everything:loongarch/openEuler%3A24.03-LTS/loongarch64/" -repos_baseos_url_2="/root/docker-library/openanolis/anolisos/23.1/git-lfs" - -trap cleanup TERM EXIT - -work_dir=$(mktemp -d $(pwd)/rootfs-image.XXXXXX) -rootfs=${work_dir}/rootfs - -repo_dir="${work_dir}/yum.repo.d" -repo_conf="${repo_dir}/openEuler.repo" -setting_scripts=setting.sh - -pkg_list=" - basesystem bash ca-certificates openEuler-release openEuler-gpg-keys - openEuler-repos chkconfig cracklib crypto-policies dnf - expat gawk gdbm glib2 gmp gnupg2 gpgme grep ima-evm-utils-libs - json-c mpfr ncurses-base procps-ng rpm findutils - npth p11-kit p11-kit-trust pcre2 popt readline rootfiles - rpm sed setup systemd-libs tzdata vim-minimal xz yum - git git-core make gcc procps rpm-build findutils dnf-plugins-core git-lfs -" - -#################################################################### -cleanup() -{ - rm -rf ${work_dir} -} -#################################################################### - -mkdir -pv ${rootfs} || : -mkdir -pv ${repo_dir} || : - -#################################################################### -# gen repos conf -#################################################################### -cat > ${repo_conf} << EOF -[baseos] -name=openEuler-$releasever -baseurl=${repos_baseos_url} -gpgcheck=0 -enabled=1 -priority=2 -excludepkgs="${exclude_pkgs}" -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LOONGNIX -[baseos-1] -name=openEuler-$releasever-1 -baseurl=${repos_baseos_url_2} -gpgcheck=0 -enabled=1 -priority=1 -excludepkgs="${exclude_pkgs}" -EOF -#################################################################### - - -#################################################################### -DNF_OPTS="\ - --setopt=install_weak_deps=False \ - --setopt=reposdir=${repo_dir} \ - --releasever=${releasever} \ - --installroot=${rootfs} \ - --nodocs" - -echo "Install packages : $pkg_list" - -rpmdb --root=${rootfs} --initdb -dnf ${DNF_OPTS} makecache --refresh -dnf ${DNF_OPTS} -y install ${pkg_list} -#################################################################### - -#################################################################### -cat > ${rootfs}/${setting_scripts} << EOF -#!/bin/bash - -## config TERM is linux -echo 'export TERM=linux' >> etc/bash.bashrc -echo 'container' > /etc/dnf/vars/infra - -#Generate installtime file record -/bin/date +%Y%m%d_%H%M > /etc/BUILDTIME - -# Limit languages to help reduce size. -LANG="en_US" -echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf -echo "LANG=en_US.UTF-8" > /etc/locale.conf - -#pushd /usr/share/locale > /dev/null -# ls | egrep -x -v "en|en@arabic|en@boldquot|en@cyrillic|en@greek|en@hebrew|en@piglatin|en@quot|en@shaw|en_CA|en_GB|en_US|locale.alias" | xargs rm -rf -#popd > /dev/null - -# systemd fixes -:> /etc/machine-id -systemd-tmpfiles --create --boot -# mask mounts and login bits -systemctl mask systemd-logind.service getty.target console-getty.service -systemctl mask sys-fs-fuse-connections.mount systemd-remount-fs.service dev-hugepages.mount - -# Remove things we don't need -yum clean all > /dev/null -rm -rf /etc/udev/hwdb.bin -rm -rf /usr/lib/udev/hwdb.d/ -rm -rf /boot -rm -rf /var/lib/dnf/history.* -rm -rf /usr/src/ -rm -rf /home/* -rm -rf /var/log/* -rm -rf /var/cache/* -rm -rf /var/lib/yum/* -## Introduced by binutils -rm -rf /usr/bin/gdb -rm -f \$0 -########################################################################### -EOF -#################################################################### - -chmod +x ${rootfs}/${setting_scripts} -chroot ${rootfs} /${setting_scripts} - -##解决在rootfs中su命令没有权限问题 -#file_list="fingerprint-auth password-auth postlogin smartcard-auth system-auth user-profile" -#for file in ${file_list} -#do -# chroot ${rootfs} authselect create-profile ${file} -# chroot ${rootfs} ln -s /etc/authselect/custom/${file} /etc/pam.d/${file} -#done - -##解决在chroot中/dev/null没有权限问题 -chroot ${rootfs} rm -rf /dev/null -chroot ${rootfs} mknod /dev/null c 1 3 -chroot ${rootfs} chmod 666 /dev/null - -cur_dir=$(pwd) -pushd ${rootfs} > /dev/null - if [ -e "${cur_dir}/${output}" ]; then - echo "Remove old ${output}" - rm -rf "${cur_dir}/${output}" - fi - - echo "Generating ${output} ...." -# tar --numeric-owner --exclude='dev/*' -acf "${cur_dir}/${output}" . - tar --numeric-owner -acf "${cur_dir}/${output}" . -popd > /dev/null - -echo "Generating ${output} md5sum...." -sync && md5sum ${output} > ${output}.md5 - -###################################### -sync && echo -e "\n^^^^^^ done ^^^^^^^^^^\n" -######################################