diff options
Diffstat (limited to 'linhes/linhes-dev')
-rw-r--r-- | linhes/linhes-dev/PKGBUILD | 13 | ||||
-rwxr-xr-x | linhes/linhes-dev/mp.py | 73 |
2 files changed, 13 insertions, 73 deletions
diff --git a/linhes/linhes-dev/PKGBUILD b/linhes/linhes-dev/PKGBUILD index 33a906d..df74320 100644 --- a/linhes/linhes-dev/PKGBUILD +++ b/linhes/linhes-dev/PKGBUILD @@ -1,19 +1,20 @@ pkgname=linhes-dev pkgver=9.0.0 -pkgrel=6 +pkgrel=7 pkgdesc="Scripts to develop LinHES" arch=('x86_64') license=('GPL2') -depends=('clean-chroot-manager' 'git' 'python-gitpython' 'rclone' 'yaah') +depends=('clean-chroot-manager' 'git' 'pacman-contrib' + 'python-gitpython' 'rclone' 'yaah') url="http://linhes.org/" source=('lh_sync.sh' 'mp.py' 'lh_setup_dev.sh' 'lh_update_db_repo.sh') +sha256sums=('3a64b4125b56c6f95cc9dc85ce58ebd1c0612b22fb27c3e76d4d9a5570f2d61e' + '16787763282f20b15eee2377712e85d5653a9229d2b73d224c0fd4532436614a' + '081ac1ccb40df0c8aa82cd3841a39aa87ead4ea32c9ac6a76c5a7d7f0d10a80a' + '86c9ebe77228f7e3cc07cb05f480e5584e0e3cad1b889b63a50821f7323bf449') package() { cd ${srcdir} install -d ${pkgdir}/usr/bin install -D -m755 * ${pkgdir}/usr/bin/ } -sha256sums=('3a64b4125b56c6f95cc9dc85ce58ebd1c0612b22fb27c3e76d4d9a5570f2d61e' - 'd7afe023b5ba5ebb5e1a12d954651e435584034e5b00c37d9a70d0d6fe20643f' - '081ac1ccb40df0c8aa82cd3841a39aa87ead4ea32c9ac6a76c5a7d7f0d10a80a' - '86c9ebe77228f7e3cc07cb05f480e5584e0e3cad1b889b63a50821f7323bf449') diff --git a/linhes/linhes-dev/mp.py b/linhes/linhes-dev/mp.py index b1bdfa7..25f7cc0 100755 --- a/linhes/linhes-dev/mp.py +++ b/linhes/linhes-dev/mp.py @@ -41,13 +41,12 @@ def commandline(makepkg_cmd): clparser.add_option("-b", "--bump", action="store_true", default=False, help="Increase package release one unit.") clparser.add_option("--pkglist", action="store", help="List of packages to compile") clparser.add_option("--config", action="store", help="Use an alternate config file instead of the /etc/makepkg.conf default.") - clparser.add_option("-g", "--geninteg", action="store_true", default=False, help="For each source file in the source array of PKGBUILD, download the file if required and generate integrity checks.") clparser.add_option("--rmold", action="store_true", default=False, help="BETA: Remove old src and software packages from repos. Use with caution. False positives may occur (i.e. nvidia pkgs)!") (options, args) = clparser.parse_args() options1 = ['config', 'pkglist'] - options2 = ['bump', 'geninteg', 'rmold'] + options2 = ['bump', 'rmold'] for o in options1: cmd1 = eval('options.'+o) @@ -74,10 +73,6 @@ def commandline(makepkg_cmd): # Remove rmold option from makepkg command if it exists if "--rmold" in makepkg_cmd: makepkg_cmd.remove("--rmold") - # Remove "--geninteg" option (if it exists) from makepkg command. - # Checking for *sums is done automaticly by mp.py - if "--geninteg" in makepkg_cmd: - makepkg_cmd.remove("--geninteg") #print("Makepkg Command:",makepkg_cmd) return makepkg_cmd, cli_list, cli_dict @@ -135,7 +130,6 @@ class Packagefile(object): self.SRCPKG = self.pkgbase + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + ".src.tar.gz" else: self.SRCPKG = self.pkglist[0] + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + ".src.tar.gz" - #print "Changed " + self.pkgname + " release to " + str(self.pkgrel) def updateINIT(self): @@ -310,64 +304,12 @@ class Packagefile(object): self.set_srcpkg() self.pkgrel_incremented = True - def clearSUMS(self): - print(" Clearing out old checksums...") - filename=self.pkgfile - file_contents=[] - f = open(filename,"r") - lineIter= iter(f) - for aLine in lineIter: - if (aLine.strip().startswith("md5sums") or aLine.strip().startswith("sha1sums") or - aLine.strip().startswith("sha256sums") or aLine.strip().startswith("sha224sums") or - aLine.strip().startswith("sha384sums") or aLine.strip().startswith("sha512sums") or - aLine.strip().startswith("b2sums") or aLine.strip().startswith("cksums")): - if aLine.strip().endswith(")"): - continue - else: - for aModule in lineIter: - if aModule.strip().endswith(")"): - break - else: - file_contents.append(aLine) - f.close() - try: - f = open(filename,"w") - except: - outtext="Couldn't open file for writing: %s" %filename - print(outtext) - return False - for line in file_contents: - f.write(line) - f.close() - def updateSUMS(self): - print("- Checking checksums...") - if "--geninteg" in self.cli_list: - self.clearSUMS() - - sums = [] - pkgfile_contents=[] - - # Open pkgfile for reading - f = open(self.pkgfile, 'r') - pkgfile_contents = f.readlines() - f.close() - - # Iterate through the lines looking for a match pattern - for line in pkgfile_contents: - check = re.compile('cksums|sha1sums|sha224sums|sha256sums|sha384sums|sha512sums|md5sums|b2sums') - sums = check.match(line) - if sums: - print(" Found checksums in PKGBUILD") - break - if not sums: - print(" Adding checksums...") - # If no matches are found, append md5sums to the end of the pkgfile - p = open(self.pkgfile, 'a') - sumsgen = subprocess.Popen(["makepkg", "-g"], stdout = subprocess.PIPE,).communicate()[0] - sumsgen = sumsgen.decode('utf-8') - p.writelines(sumsgen) - p.close() + print("- Updating checksums...") + retcode = subprocess.call(["updpkgsums"]) + if retcode != 0: + self.compile_status = "Failed: %s" %retcode + self.failure = self.failure + 1 def make_package(self): #creates both binary and source package @@ -390,9 +332,6 @@ class Packagefile(object): shutil.move(self.pkgfile + '.old', self.pkgfile) print(" Reverted pkgrel increment.") return False - elif "--nobuild" in self.makepkg_cmd: - self.compile_status = "Failed: nobuild" - return False else: print("-------------Making source package-------------") retcode = subprocess.call(["makepkg", "--force", "--holdver", "--source"]) |