From d0f60ef45eb299a385b36556f800f03c35b680e1 Mon Sep 17 00:00:00 2001 From: axk4545 Date: Wed, 19 Apr 2017 22:32:55 -0400 Subject: [PATCH 1/5] ks includes scripts but only when run outside of mock, modified scripts as needed, kept spec for later. --- ci-build-mock.sh | 22 ++++++++++++++ ci-build.sh | 15 ++++------ rpmbuild/SPECS/tigeros-scripts.spec | 45 +++++++++++++++++++++++++++++ tigeros.ks | 5 ++-- 4 files changed, 75 insertions(+), 12 deletions(-) create mode 100644 ci-build-mock.sh create mode 100644 rpmbuild/SPECS/tigeros-scripts.spec diff --git a/ci-build-mock.sh b/ci-build-mock.sh new file mode 100644 index 0000000..e8bed38 --- /dev/null +++ b/ci-build-mock.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -eu + +##################################################################### +# TigerOS Build Script for running on the build box with Jenkins CI # +# @author: Aidan Kahrs # +# # +# Usage: sudo bash build.sh # +# # +##################################################################### +wget -O tigeros.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros.ks +mock -r fedora-25-x86_64 --init +mock -r fedora-25-x86_64 --copyin tigeros.ks ./tigeros.ks +mock -r fedora-25-x86_64 --install lorax-lmc-novirt git vim-minimal pykickstart svn +mock -r fedora-25-x86_64 --chroot "svn export https://github.com/RITlug/TigerOS/trunk/scripts/" +mock -r fedora-25-x86_64 --chroot "livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot" +mock -r fedora-25-x86_64 --copyout /var/lmc/TigerOS.iso /srv/isos/TigerOS.iso +rm -rf /var/lmc/ +cd /srv/isos/ +sha512sum *.iso >CHECKSUM512 + + diff --git a/ci-build.sh b/ci-build.sh index e8bed38..cdfce3c 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -5,18 +5,15 @@ set -eu # TigerOS Build Script for running on the build box with Jenkins CI # # @author: Aidan Kahrs # # # -# Usage: sudo bash build.sh # +# Usage: sudo bash build.sh # # # ##################################################################### +rm -rf tigeros.ks wget -O tigeros.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros.ks -mock -r fedora-25-x86_64 --init -mock -r fedora-25-x86_64 --copyin tigeros.ks ./tigeros.ks -mock -r fedora-25-x86_64 --install lorax-lmc-novirt git vim-minimal pykickstart svn -mock -r fedora-25-x86_64 --chroot "svn export https://github.com/RITlug/TigerOS/trunk/scripts/" -mock -r fedora-25-x86_64 --chroot "livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot" -mock -r fedora-25-x86_64 --copyout /var/lmc/TigerOS.iso /srv/isos/TigerOS.iso +livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot rm -rf /var/lmc/ -cd /srv/isos/ -sha512sum *.iso >CHECKSUM512 +cp -f TigerOS.iso /srv/isos/ +cd /srv/isos +sha512sum *.iso > CHECKSUM512 diff --git a/rpmbuild/SPECS/tigeros-scripts.spec b/rpmbuild/SPECS/tigeros-scripts.spec new file mode 100644 index 0000000..7bc452f --- /dev/null +++ b/rpmbuild/SPECS/tigeros-scripts.spec @@ -0,0 +1,45 @@ +Name: tigeros-scripts +Version: 1.0 +Release: 1%{?dist} +Summary: TigerOS setup scripts +License: GPLv3 +URL: https://github.com/RITlug/TigerOS +Source0: %{name}.tar.gz +BuildArch: noarch +BuildRequires: git + +%description +JFLAP is a package of graphical tools which can be used as an aid in learning the basic concepts of Formal Languages and Automata Theory. + +%prep +tar -xvf %{_sourcedir}/%{name}.tar.gz -C %{_sourcedir} + +%build +echo "We don't need to build" + +%install +%{__mkdir_p} %{buildroot}%{_prefix}/local/tigeros +install -p -m 755 %{_sourcedir}/FusionEnableLauncher.py %{buildroot}%{_prefix}/local/tigeros/FusionEnableLauncher.py +%{__mkdir_p} %{buildroot}%{_prefix}/local/tigeros/cs +install -p -m 755 %{_sourcedir}/cs/idea.sh %{buildroot}%{_prefix}/local/tigeros/cs/idea.sh +install -p -m 755 %{_sourcedir}/cs/jflap.sh %{buildroot}%{_prefix}/local/tigeros/cs/jflap.sh +install -p -m 755 %{_sourcedir}/cs/logisim.sh %{buildroot}%{_prefix}/local/tigeros/cs/logisim.sh +install -p -m 755 %{_sourcedir}/enablerpmfusion.sh %{buildroot}%{_prefix}/local/tigeros/enablerpmfusion.sh +install -p -m 755 %{_sourcedir}/removal %{buildroot}%{_prefix}/local/tigeros/removal +install -p -m 755 %{_sourcedir}/postinstall %{buildroot}%{_prefix}/local/tigeros/postinstall +%{__mkdir_p} %{buildroot}%{_prefix}/local/tigeros/se +install -p -m 755 %{_sourcedir}/se/alloy.sh %{buildroot}%{_prefix}/local/tigeros/se/alloy.sh +install -p -m 755 %{_sourcedir}/se/spin.sh %{buildroot}%{_prefix}/local/tigeros/se/spin.sh + +%files +%{_prefix}/local/tigeros/FusionEnableLauncher.py +%{_prefix}/local/tigeros/cs +%{_prefix}/local/tigeros/cs/idea.sh +%{_prefix}/local/tigeros/cs/jflap.sh +%{_prefix}/local/tigeros/cs/logisim.sh +%{_prefix}/local/tigeros/enablerpmfusion.sh +%{_prefix}/local/tigeros/removal +%{_prefix}/local/tigeros/postinstall +%{_prefix}/local/tigeros/se/alloy.sh +%{_prefix}/local/tigeros/se/spin.sh +%changelog diff --git a/tigeros.ks b/tigeros.ks index 4ad909a..81626a8 100644 --- a/tigeros.ks +++ b/tigeros.ks @@ -362,9 +362,8 @@ cd /usr/share/backgrounds/images mkdir -p /usr/share/autostart mkdir -p /usr/local/tigeros/ cd /usr/local/tigeros/ -#wget people.rit.edu/axk4545/scripts.tar.gz -wget --no-check-certificate http://129.21.1.44/axk4545/scripts.tar.gz -tar -xvf /usr/local/tigeros/scripts.tar.gz -C /usr/local/tigeros/ +svn export https://github.com/RITlug/TigerOS/trunk/scripts/ /usr/local/tigeros/ +mv "scripts/*" /usr/local/tigeros/ ln -s /usr/local/enablerpmfusion.sh /usr/share/autostart/enablerpmfusion.sh ln -s /usr/local/tigeros/FusionEnableLauncher.py /usr/share/autostart/FusionEnableLauncher.py ln -s /usr/local/tigeros/postinstall /usr/share/autostart/postinstall From 9d89ed24ad3c30d54bba3553dd22b5dc7aa2fae9 Mon Sep 17 00:00:00 2001 From: axk4545 Date: Wed, 19 Apr 2017 22:41:02 -0400 Subject: [PATCH 2/5] update to exclude mock stuff --- README.md | 1 - make-iso.sh | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1047f85..b4b91ff 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ TigerOS ``` git clone https://github.com/RITlug/TigerOS.git ``` -* Install [Mock](https://github.com/rpm-software-management/mock/wiki) according to your system. ### Build the ISO From the directory where you cloned this repo run the commands below. You may need to preface it with `sudo` if you do not have root privileges. ``` diff --git a/make-iso.sh b/make-iso.sh index c976c7d..cec0cd3 100644 --- a/make-iso.sh +++ b/make-iso.sh @@ -12,11 +12,12 @@ green=`tput setaf 2` reset=`tput sgr0` echo "${green}Welcome to the TigerOS build script${reset}" -mock -r fedora-25-x86_64 --init -mock -r fedora-25-x86_64 --copyin tigeros.ks ./tigeros.ks -mock -r fedora-25-x86_64 --install lorax-lmc-novirt git vim-minimal pykickstart svn -mock -r fedora-25-x86_64 --chroot "svn export https://github.com/RITlug/TigerOS/trunk/scripts/" +#mock -r fedora-25-x86_64 --init +#mock -r fedora-25-x86_64 --copyin tigeros.ks ./tigeros.ks +#mock -r fedora-25-x86_64 --install lorax-lmc-novirt git vim-minimal pykickstart svn +#mock -r fedora-25-x86_64 --chroot "svn export https://github.com/RITlug/TigerOS/trunk/scripts/" echo "${green}Beginning build process${reset}" -mock -r fedora-25-x86_64 --chroot "livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot" -mock -r fedora-25-x86_64 --copyout /var/lmc/TigerOS.iso TigerOS.iso +livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot +#mock -r fedora-25-x86_64 --chroot "livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot" +#mock -r fedora-25-x86_64 --copyout /var/lmc/TigerOS.iso TigerOS.iso echo "${green}ISO saved to $(pwd)/TigerOS.iso${reset}" From 37868fea769c53d962fdcecab1a5a92988fb6a12 Mon Sep 17 00:00:00 2001 From: axk4545 Date: Thu, 20 Apr 2017 00:41:15 -0400 Subject: [PATCH 3/5] update commands --- ci-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci-build.sh b/ci-build.sh index cdfce3c..6a22784 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -11,9 +11,11 @@ set -eu rm -rf tigeros.ks wget -O tigeros.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros.ks livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot +cp -f /var/lmc/TigerOS.iso /srv/isos/ rm -rf /var/lmc/ -cp -f TigerOS.iso /srv/isos/ cd /srv/isos sha512sum *.iso > CHECKSUM512 +cd /home/build +rm -rf anaconda/ *.log From fba85bf71ebaf68c3fa10f3f98d67f7d6e662a6c Mon Sep 17 00:00:00 2001 From: axk4545 Date: Thu, 20 Apr 2017 00:45:44 -0400 Subject: [PATCH 4/5] I did a dumb and pushed to master :( This reverts commit 37868fea769c53d962fdcecab1a5a92988fb6a12. --- ci-build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ci-build.sh b/ci-build.sh index 6a22784..cdfce3c 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -11,11 +11,9 @@ set -eu rm -rf tigeros.ks wget -O tigeros.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros.ks livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot -cp -f /var/lmc/TigerOS.iso /srv/isos/ rm -rf /var/lmc/ +cp -f TigerOS.iso /srv/isos/ cd /srv/isos sha512sum *.iso > CHECKSUM512 -cd /home/build -rm -rf anaconda/ *.log From ccbd1fe171e2a13d85bdf8f4da685f9e0e921c5a Mon Sep 17 00:00:00 2001 From: axk4545 Date: Thu, 20 Apr 2017 00:53:46 -0400 Subject: [PATCH 5/5] update commands --- ci-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-build.sh b/ci-build.sh index cdfce3c..6265a00 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -11,9 +11,9 @@ set -eu rm -rf tigeros.ks wget -O tigeros.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros.ks livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot +cp -f /var/lmc/TigerOS.iso /srv/isos/ rm -rf /var/lmc/ -cp -f TigerOS.iso /srv/isos/ cd /srv/isos sha512sum *.iso > CHECKSUM512 - - +cd /home/build +rm -rf anaconda/ *.log