Browse Source

sync with upstream

master
Alf Gaida 4 years ago
parent
commit
722d888018
8 changed files with 87 additions and 35 deletions
  1. 5
    3
      pyfll/README
  2. 7
    10
      pyfll/debian/changelog
  3. 2
    2
      pyfll/debian/control
  4. 0
    0
      pyfll/dummy-file
  5. 2
    2
      pyfll/fll.conf
  6. 43
    18
      pyfll/gpthybrid
  7. 2
    0
      pyfll/setup.cfg
  8. 26
    0
      pyfll/setup.py

+ 5
- 3
pyfll/README View File

@@ -13,8 +13,10 @@ Dependencies:
13 13
   xorriso
14 14
   python-fll
15 15
   squashfs-tools
16
-  gdisk
17
-  isolinux
16
+  reprepro (for liveapt functionality and extras (uefi))
17
+Recommends:
18
+  gdisk (for gpthybrid used with grub, not needed if using isolinux)
19
+Suggests:
20
+  isolinux (and the following syslinux* if you want to use isolinux)
18 21
   syslinux
19 22
   syslinux-utils
20
-  reprepro (for liveapt functionality and extras (uefi))

+ 7
- 10
pyfll/debian/changelog View File

@@ -1,4 +1,4 @@
1
-pyfll (2013.02+nmu3) UNRELEASED; urgency=low
1
+pyfll (2013.02) UNRELEASED; urgency=low
2 2
 
3 3
   * NOT RELEASED YET
4 4
 
@@ -33,7 +33,7 @@ pyfll (2013.02+nmu3) UNRELEASED; urgency=low
33 33
   * elinks-lite no longer exists, use full elinks instead.
34 34
   * exclude (empty) bootstrap.log.
35 35
   * disable flegita for the time being, it's not installable.
36
-  * bump standards version to 3.9.5, no changes necessary.
36
+  * bump standards version to 3.9.6, no changes necessary.
37 37
   * debian/control: switch Vcs tags to github.
38 38
   * don't pull in alsa-base.
39 39
   * update README (depend on isolinux, syslinux-utils and reprepro).
@@ -65,6 +65,10 @@ pyfll (2013.02+nmu3) UNRELEASED; urgency=low
65 65
   * switch to plymouth ("details" theme) for console multiplexing.
66 66
   * improve grub2 preseeding for the installed system.
67 67
   * drop unused FLL_DISTRO_URL variable.
68
+  * drop ntpdate, systemd-timedated takes over the common cases - tlsdate is a
69
+    better choice for the uncommon ones.
70
+  * switch to http.debian.net as GeoMirror.
71
+  * convert to machine readable copyright.
68 72
 
69 73
   [ Joaquim Boura ]
70 74
   * cleaned up xfce4-desktop-min
@@ -87,10 +91,8 @@ pyfll (2013.02+nmu3) UNRELEASED; urgency=low
87 91
   * TEMP? drop isolinux and switch to grub (automatic fromhd broken)
88 92
   * drop bluez-pcmcia-support (gone with bluez 5.x)
89 93
   * add efibootmgr for i386.
90
-  * add firmware menuentry to grub.cfg
91 94
   * same bootloader (grub-* and efibootmgr) packages for i386 and amd64
92 95
   * set and export pager by default in grub.cfg
93
-  * add i386-efi to kernel command line when booted under it
94 96
   * add grub2-fll-portable-efi to extras
95 97
   * add part_gpt to built in modules for cd efi loader (for detect efi anyway)
96 98
   * create /disks to reflect changed fstab_generator
@@ -114,12 +116,7 @@ pyfll (2013.02+nmu3) UNRELEASED; urgency=low
114 116
   * add initial razorqt profile 
115 117
   * add qupzilla, qpdfview
116 118
 
117
-  [ Ferdinand Thommes ]
118
-  * added plasma-widget-milou to 940-siduction-kde
119
-  * added kde-config-baloo-advanced
120
-  * added kcmsystemd module for systemsettings
121
-
122
- -- Ferdinand Thommes <devil@siduction.org>  Wed, 19 Nov 2014 12:27:49 +0100
119
+ -- Niall Walsh <niallwalsh@celtux.org>  Fri, 05 Sep 2014 02:39:12 +0100
123 120
 
124 121
 pyfll (2013.01) hesperides; urgency=low
125 122
 

+ 2
- 2
pyfll/debian/control View File

@@ -17,11 +17,11 @@ Vcs-Browser: https://github.com/fullstory/pyfll
17 17
 #         python-apt,
18 18
 #         python-configobj,
19 19
 #         debootstrap | cdebootstrap,
20
-#         gdisk,
21
-#         isolinux,
22 20
 #         xorriso,
23 21
 #         reprepro,
24 22
 #         squashfs-tools,
23
+#Recommends: gdisk
24
+#Suggests: isolinux,
25 25
 #         syslinux,
26 26
 #         syslinux-utils
27 27
 #Description: FULLSTORY live linux media mastering utility

+ 0
- 0
pyfll/dummy-file View File


+ 2
- 2
pyfll/fll.conf View File

@@ -113,7 +113,7 @@ i18n = """
113 113
 #build_dir =
114 114
 #output_dir =
115 115
 
116
-#build_log = #/path/to/build.log
116
+#build_log = /path/to/build.log
117 117
 
118 118
 #media_include = /path/to/release/notes
119 119
 
@@ -132,7 +132,7 @@ i18n = """
132 132
 # debootstrap. Reverted towo's change (hardcoded debootstrap)
133 133
 bootstrapper = debootstrap
134 134
 
135
-#squashfs_comp = xz
135
+#squashfs_comp = gzip
136 136
 
137 137
 [ 'distro' ]
138 138
 FLL_DISTRO_NAME = "siduction"

+ 43
- 18
pyfll/gpthybrid View File

@@ -7,10 +7,25 @@ from optparse import OptionParser
7 7
 parser = OptionParser()
8 8
 parser.add_option("-l", "--label", dest="l", default="", help="set the partlabel stem for rootfs partitions")
9 9
 parser.add_option("-i", "--iso", dest="i", help="name of the iso to gpthybridise")
10
+parser.add_option("-s", "--sector", dest="s", default=4, help="size of sectors to use in resulting partition table")
10 11
 (options, args) = parser.parse_args()
11 12
 
12 13
 iso_file = options.i
13 14
 label = options.l
15
+sectors = options.s
16
+
17
+def modup(number,mod,target):
18
+	if (number % mod != target):
19
+		number = number + target - number % mod
20
+	return number
21
+def moddown(number,mod,target):
22
+	if (number % mod != target):
23
+		adjust = number % mod - target
24
+		if (adjust > 0):
25
+			number -= adjust
26
+		else:
27
+			number -= mod + adjust
28
+	return number
14 29
 
15 30
 buffout = "gpthybridising iso %s" % iso_file
16 31
 if len(label):
@@ -24,21 +39,31 @@ end = 0
24 39
 i = 0
25 40
 for old_part in gdisks.split("\n"):
26 41
 	if old_part.startswith('   1'):
42
+		# below we want last as "end" of space before 1st partiion
27 43
 		last = int(old_part.split()[1])-1
28
-		print "first partition sets last to %i" % last
44
+		# min 63 and round up to %sectors==sectors-1 (so 63 means next starts on 64)
45
+		if last<63:
46
+			last=63
47
+		last = modup(last,sectors,sectors-1)
48
+		print "first partition set last to %i" % last
29 49
 	if old_part.startswith('   '):
30
-		end = int(old_part.split()[2])
31
-		print "got partition ending: %i" % end
50
+		# end should be the last used sector
51
+		testend = int(old_part.split()[2])
52
+		if (testend > end):
53
+			end = modup(testend,sectors,sectors-1)
54
+			print "got partition ending: %i" % end
32 55
 		i += 1
33 56
 
34 57
 # get the lba addresses of the files using osirrox
35 58
 parts = list()
36 59
 osirrox=list(["/usr/bin/osirrox", "-pkt_output", "on",
37 60
 		 "-indev", iso_file,
38
-		 '-logfile', '.', '-',
39
-		 '-find', '/efi.img', '-exec', 'report_lba', '--'])
61
+		 '-logfile', '.', '-',])
62
+		 #'-find', '/efi.img', '-exec', 'report_lba', '--'])
63
+
40 64
 for file in args:
41 65
 	osirrox.extend(['-find', file, '-exec', 'report_lba', '--'])
66
+
42 67
 print "running: %s" % " ".join(osirrox)
43 68
 for line in check_output(osirrox).split("\n"):
44 69
 	if line[:22] == 'R:1: File data lba:  0':
@@ -57,12 +82,12 @@ for line in check_output(osirrox).split("\n"):
57 82
 				# we start before this part
58 83
 				if done == 0:
59 84
 					# add ourselves if not done
60
-					post.append("%s %s %s" % (s, s+b-1, n))
85
+					post.append("%s %s %s" % (moddown(s,sectors,0), modup(s+b-1,sectors,3), n))
61 86
 					done = 1
62 87
 			post.append(part)
63 88
 		if done == 0:
64 89
 			# no parts for us to go before so add to the end
65
-			post.append("%s %s %s" % (s, s+b-1, n))
90
+			post.append("%s %s %s" % (moddown(s,sectors,0), modup(s+b-1,sectors,3), n))
66 91
 		parts = post
67 92
 
68 93
 # gdisk commands to delete the existing partitions
@@ -81,12 +106,12 @@ if i==1:
81 106
 # gap and pnum just count
82 107
 gap = 1
83 108
 pnum = 1
84
-# set to 4 sector alignment (2048b iso sector size) for partition creation
109
+# set sectors alignment (2048b iso sector size by default) for partition creation
85 110
 cmdpart = """x
86 111
 l
87
-4
112
+%i
88 113
 m
89
-"""
114
+""" % sectors
90 115
 for part in parts:
91 116
 	(s, e, n) = part.split()
92 117
 	# default to ms basic partition and no custom label
@@ -103,16 +128,15 @@ for part in parts:
103 128
 		t = 'ef00'
104 129
 	elif len(n) >5 and n[-5:] == '.ef02':
105 130
 		t = 'ef02'
106
-	# if the last partition ended more then 3 less then this starts
107
-	if int(s)-last >= 4:
108
-		# create gap from end of last+1 to start-1
131
+	# if the last partition ended more then sectors less then this starts
132
+	if int(s)-last >= sectors:
109 133
 		cmdpart += """n
110 134
 %i
111 135
 %i
112 136
 %i
113 137
 0700
114 138
 c
115
-""" % (pnum, last+1, int(s)-1)
139
+""" % (pnum, modup(last+1,sectors,0), moddown(int(s)-1,sectors,3))
116 140
 		if pnum > 1:
117 141
 			cmdpart += "%s\n" % str(pnum)
118 142
 		cmdpart += "Gap%i\n" % (gap)
@@ -136,7 +160,7 @@ c
136 160
 """
137 161
 
138 162
 # create a gap from end of last partition and end of last gap if needed
139
-if (end-last>3):
163
+if (end-last>sectors-1):
140 164
 	cmdpart += """n
141 165
 %i
142 166
 %s
@@ -146,9 +170,9 @@ c
146 170
 %i
147 171
 Gap%i
148 172
 p
149
-""" % (pnum,last+1, pnum, gap)
173
+""" % (pnum,modup(last+1,sectors,0), pnum, gap)
150 174
 
151
-# set back to 2048 sector alignment for new partitions
175
+# set back to normal 2048 sector alignment for new partitions
152 176
 cmdpart += """x
153 177
 l
154 178
 2048
@@ -162,6 +186,7 @@ Y
162 186
 
163 187
 # run our commands through gdisk
164 188
 cmd = "%s\n%s\n%s" % (cmddel, cmdpart, cmdend)
165
-print "gdisk stdin: %s" % cmd.replace("\n", " ")
189
+print "gdisk stdin: %s" % cmd.replace("\n", "\\n")
166 190
 gdisks = Popen(["/sbin/gdisk",iso_file],stdin=PIPE).communicate(input=cmd)
167 191
 
192
+# TODO read gdisk result and verify or throw big warning/error

+ 2
- 0
pyfll/setup.cfg View File

@@ -0,0 +1,2 @@
1
+[install]
2
+install-scripts=/usr/sbin

+ 26
- 0
pyfll/setup.py View File

@@ -0,0 +1,26 @@
1
+#!/usr/bin/python
2
+
3
+from distutils.core import setup
4
+from glob import glob
5
+import os
6
+
7
+fll_prog = ['pyfll', 'fll.conf']
8
+fll_data = glob('data/*')
9
+fll_pkgs = [f for f in glob('packages/*') if os.path.isfile(f)]
10
+fll_pkgs_d = glob('packages/packages.d/*')
11
+
12
+setup(
13
+    name='pyfll',
14
+    author='Kelvin Modderman',
15
+    author_email='kel@otaku42.de',
16
+    license='GPL-2',
17
+    description='FULLSTORY live linux media mastering utility',
18
+    url='http://developer.berlios.de/projects/fullstory/',
19
+    scripts=['fll'],
20
+    data_files=[
21
+        ('/usr/share/fll/', fll_prog),
22
+        ('/usr/share/fll/data', fll_data),
23
+        ('/usr/share/fll/packages', fll_pkgs),
24
+        ('/usr/share/fll/packages/packages.d/', fll_pkgs_d),
25
+    ],
26
+)

Loading…
Cancel
Save