userland: several ports

This commit is contained in:
Matheus
2025-09-18 20:24:19 -03:00
parent a9f093fa29
commit f34bce058d
19 changed files with 895 additions and 42 deletions
+36
View File
@@ -0,0 +1,36 @@
diff --git ninja-clean/configure.py ninja-workdir/configure.py
index 03b5ce4..66af21a 100755
--- ninja-clean/configure.py
+++ ninja-workdir/configure.py
@@ -65,16 +65,21 @@ class Platform(object):
self._platform = 'os400'
elif self._platform.startswith('dragonfly'):
self._platform = 'dragonfly'
+ elif self._platform.startswith('astral'):
+ self._platform = 'astral'
@staticmethod
def known_platforms() -> List[str]:
return ['linux', 'darwin', 'freebsd', 'openbsd', 'solaris', 'sunos5',
'mingw', 'msvc', 'gnukfreebsd', 'bitrig', 'netbsd', 'aix',
- 'dragonfly']
+ 'dragonfly', 'astral']
def platform(self) -> str:
return self._platform # type: ignore # Incompatible return value type
+ def is_astral(self) -> bool:
+ return self._platform == 'astral'
+
def is_linux(self) -> bool:
return self._platform == 'linux'
@@ -108,7 +113,7 @@ class Platform(object):
def supports_ppoll(self) -> bool:
return self._platform in ('freebsd', 'linux', 'openbsd', 'bitrig',
- 'dragonfly')
+ 'dragonfly', 'astral')
def supports_ninja_browse(self) -> bool:
return (not self.is_windows()
+639
View File
@@ -0,0 +1,639 @@
diff --git parted-clean/configure parted-workdir/configure
index 7b7b1fd..7f6404f 100755
--- parted-clean/configure
+++ parted-workdir/configure
@@ -5323,6 +5323,7 @@ case "$host_os" in
linux*|uclinux*) OS=linux ;;
gnu*) OS=gnu ;;
beos*) OS=beos ;;
+ astral*) OS=astral ;;
*) as_fn_error $? "Unknown or unsupported OS \"$host_os\". Only \"linux\", \"uclinux\", \"gnu\" and \"beos\" are supported in this version of GNU Parted." "$LINENO" 5 ;;
esac
diff --git parted-workdir/libparted/arch/astral.c parted-workdir/libparted/arch/astral.c
new file mode 100644
index 0000000..2989679
--- /dev/null
+++ parted-workdir/libparted/arch/astral.c
@@ -0,0 +1,558 @@
+/*
+ libparted - a library for manipulating disk partitions
+ Copyright (C) 2006-2007, 2009-2014, 2019-2023 Free Software Foundation,
+ Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <parted/parted.h>
+#include <parted/debug.h>
+
+/* POSIX headers */
+#include <sys/stat.h>
+#include <dirent.h>
+#include <limits.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <sys/sysmacros.h>
+
+#include "../architecture.h"
+
+#define _(str) (str)
+
+#define ASTRAL_SPECIFIC(dev) ((struct astral_specific *) (dev)->arch_specific)
+
+struct astral_specific {
+ int fd;
+};
+
+#define BLOCK_TYPE_DISK 0
+#define BLOCK_TYPE_PART 1
+
+#define BLOCK_IOCTL_GETDESC 0xb10ccd35c
+
+struct astral_blockdesc {
+ void *filler;
+ int type;
+ uintmax_t lbaoffset;
+ size_t blockcapacity;
+ size_t blocksize;
+ void *filler2[2];
+};
+
+static int
+_do_fsync (PedDevice* dev)
+{
+ struct astral_specific* arch_specific = ASTRAL_SPECIFIC (dev);
+ int status;
+ PedExceptionOption ex_status;
+
+ while (1) {
+ status = fsync (arch_specific->fd);
+ if (status >= 0) break;
+
+ ex_status = ped_exception_throw (
+ PED_EXCEPTION_ERROR,
+ PED_EXCEPTION_RETRY_IGNORE_CANCEL,
+ _("%s during write on %s"),
+ strerror (errno), dev->path);
+
+ switch (ex_status) {
+ case PED_EXCEPTION_IGNORE:
+ return 1;
+
+ case PED_EXCEPTION_RETRY:
+ break;
+
+ case PED_EXCEPTION_UNHANDLED:
+ ped_exception_catch ();
+ /* FALLTHROUGH */
+ case PED_EXCEPTION_CANCEL:
+ return 0;
+ default:
+ PED_ASSERT (0);
+ break;
+ }
+ }
+ return 1;
+}
+
+static int
+_device_init_blkdev(PedDevice* dev)
+{
+ int type;
+ struct astral_blockdesc desc;
+ int fd = open(dev->path, O_RDONLY);
+ if (fd < 0)
+ return 0;
+
+ if (ioctl(fd, BLOCK_IOCTL_GETDESC, &desc) < 0)
+ goto error;
+
+ close (fd);
+
+ dev->length = desc.blockcapacity;
+ dev->sector_size = dev->phys_sector_size = desc.blocksize;
+
+ /* XXX: We have no way to get this! */
+ dev->bios_geom.sectors = 63;
+ dev->bios_geom.heads = 255;
+ int cyl_size = dev->bios_geom.sectors * dev->bios_geom.heads;
+ dev->bios_geom.cylinders = dev->length / cyl_size
+ * (dev->sector_size / PED_SECTOR_SIZE_DEFAULT);
+ dev->hw_geom = dev->bios_geom;
+ dev->model = strdup("Disk device");
+
+ // determine type
+
+ if (dev->path && strstr(dev->path, "nvme"))
+ return PED_DEVICE_NVME;
+
+ return PED_DEVICE_UNKNOWN;
+error:
+ close(fd);
+ return 0;
+}
+
+static int
+_device_init_file(PedDevice* dev, struct stat* dev_statp)
+{
+ if (!dev_statp->st_size)
+ return 0;
+
+ dev->sector_size =
+ dev->phys_sector_size = PED_SECTOR_SIZE_DEFAULT;
+
+ dev->length = dev_statp->st_size / PED_SECTOR_SIZE_DEFAULT;
+
+ dev->bios_geom.cylinders = dev->length / (4 * 32);
+ dev->bios_geom.heads = 4;
+ dev->bios_geom.sectors = 32;
+ dev->hw_geom = dev->bios_geom;
+
+ dev->model = strdup(_("Disk Image"));
+
+ return PED_DEVICE_FILE;
+}
+
+static int
+_device_init(PedDevice* dev)
+{
+ struct stat dev_stat;
+ int type = 0;
+
+ /* Check if we're a regular file */
+ if (stat(dev->path, &dev_stat) < 0)
+ goto done;
+
+ if (S_ISBLK(dev_stat.st_mode))
+ type = _device_init_blkdev(dev);
+ else if (S_ISREG(dev_stat.st_mode))
+ type = _device_init_file(dev,&dev_stat);
+
+done:
+ return type;
+}
+
+
+static PedDevice*
+astral_new (const char* path)
+{
+ struct stat stat_info;
+ PedDevice* dev;
+
+ PED_ASSERT(path != NULL);
+
+ dev = (PedDevice*) ped_malloc (sizeof (PedDevice));
+ if (!dev)
+ goto error;
+
+ dev->path = strdup(path);
+ if (!dev->path)
+ goto error_free_dev;
+
+ dev->arch_specific
+ = (struct astral_specific *) ped_malloc(sizeof(struct astral_specific));
+ if (dev->arch_specific == NULL)
+ goto error_free_path;
+
+ dev->open_count = 0;
+ dev->read_only = 0;
+ dev->external_mode = 0;
+ dev->dirty = 0;
+ dev->boot_dirty = 0;
+
+ if ((dev->type=_device_init(dev)) <= 0)
+ goto error_free_arch_specific;
+
+ /* All OK! */
+ return dev;
+
+error_free_arch_specific:
+ free (dev->arch_specific);
+
+error_free_path:
+ free (dev->path);
+
+error_free_dev:
+ free (dev);
+
+error:
+ return NULL;
+}
+
+static void
+astral_destroy (PedDevice* dev)
+{
+ free (dev->arch_specific);
+ free (dev->path);
+ free (dev->model);
+ free (dev);
+}
+
+static int
+astral_is_busy (PedDevice* dev)
+{
+ return 1;
+}
+
+static int
+astral_open (PedDevice* dev)
+{
+ struct astral_specific *arch_specific = ASTRAL_SPECIFIC(dev);
+
+retry:
+ arch_specific->fd = open(dev->path, O_RDWR);
+ if (arch_specific->fd == -1) {
+ char* rw_error_msg = strerror(errno);
+
+ arch_specific->fd = open (dev->path, O_RDONLY);
+ if (arch_specific->fd == -1) {
+ if (ped_exception_throw (
+ PED_EXCEPTION_ERROR,
+ PED_EXCEPTION_RETRY_CANCEL,
+ _("Error opening %s: %s"),
+ dev->path, strerror (errno))
+ != PED_EXCEPTION_RETRY) {
+ return 0;
+ } else {
+ goto retry;
+ }
+ } else {
+ ped_exception_throw (
+ PED_EXCEPTION_WARNING,
+ PED_EXCEPTION_OK,
+ _("Unable to open %s read-write (%s). %s has "
+ "been opened read-only."),
+ dev->path, rw_error_msg, dev->path);
+ dev->read_only = 1;
+ }
+ } else {
+ dev->read_only = 0;
+ }
+
+ _do_fsync (dev);
+
+ return 1;
+}
+
+static int astral_refresh_open (PedDevice* dev)
+{
+ return 1;
+}
+
+static int astral_close (PedDevice* dev)
+{
+ struct astral_specific *arch_specific = ASTRAL_SPECIFIC(dev);
+
+ if (dev->dirty)
+ _do_fsync(dev);
+
+ close (arch_specific->fd);
+
+ return 1;
+}
+
+static int astral_refresh_close (PedDevice* dev)
+{
+ if (dev->dirty)
+ _do_fsync(dev);
+
+ return 1;
+}
+
+static int astral_read (const PedDevice* dev, void* buffer, PedSector start, PedSector count)
+{
+ struct astral_specific *arch_specific = ASTRAL_SPECIFIC(dev);
+ int status;
+ PedExceptionOption ex_status;
+ size_t read_length = count * dev->sector_size;
+
+ PED_ASSERT(dev->sector_size % PED_SECTOR_SIZE_DEFAULT == 0);
+
+ /* First, try to seek */
+ while(1)
+ {
+ if (lseek(arch_specific->fd, start * dev->sector_size, SEEK_SET)
+ == start * dev->sector_size)
+ break;
+
+ ex_status = ped_exception_throw (
+ PED_EXCEPTION_ERROR,
+ PED_EXCEPTION_RETRY_IGNORE_CANCEL,
+ _("%s during seek for read on %s"),
+ strerror (errno), dev->path);
+
+ switch (ex_status)
+ {
+ case PED_EXCEPTION_IGNORE:
+ return 1;
+ case PED_EXCEPTION_RETRY:
+ break /* out of switch */;
+ case PED_EXCEPTION_UNHANDLED:
+ ped_exception_catch ();
+ case PED_EXCEPTION_CANCEL:
+ return 0;
+ }
+ }
+
+ /* If we seeked ok, now is the time to read */
+ while (1)
+ {
+ status = read(arch_specific->fd, buffer, read_length);
+ if (status == count * dev->sector_size)
+ break;
+
+ if (status > 0)
+ {
+ read_length -= status;
+ buffer += status;
+ continue;
+ }
+
+ ex_status = ped_exception_throw (
+ PED_EXCEPTION_ERROR,
+ PED_EXCEPTION_RETRY_IGNORE_CANCEL,
+ _("%s during read on %s"),
+ strerror (errno),
+ dev->path);
+
+ switch (ex_status)
+ {
+ case PED_EXCEPTION_IGNORE:
+ return 1;
+ case PED_EXCEPTION_RETRY:
+ break;
+ case PED_EXCEPTION_UNHANDLED:
+ ped_exception_catch ();
+ case PED_EXCEPTION_CANCEL:
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+static int astral_write (PedDevice* dev, const void* buffer, PedSector start,
+ PedSector count)
+{
+ struct astral_specific *arch_specific = ASTRAL_SPECIFIC(dev);
+ int status;
+ PedExceptionOption ex_status;
+ size_t write_length = count * dev->sector_size;
+
+ PED_ASSERT(dev->sector_size % PED_SECTOR_SIZE_DEFAULT == 0);
+
+ if (dev->read_only)
+ {
+ if (ped_exception_throw (
+ PED_EXCEPTION_ERROR,
+ PED_EXCEPTION_IGNORE_CANCEL,
+ _("Can't write to %s, because it is opened read-only."),
+ dev->path)
+ != PED_EXCEPTION_IGNORE)
+ return 0;
+ else
+ return 1;
+ }
+
+ while(1)
+ {
+ if (lseek(arch_specific->fd,start * dev->sector_size,SEEK_SET)
+ == start * dev->sector_size)
+ break;
+
+ ex_status = ped_exception_throw (
+ PED_EXCEPTION_ERROR, PED_EXCEPTION_RETRY_IGNORE_CANCEL,
+ _("%s during seek for write on %s"),
+ strerror (errno), dev->path);
+
+ switch (ex_status)
+ {
+ case PED_EXCEPTION_IGNORE:
+ return 1;
+ case PED_EXCEPTION_RETRY:
+ break;
+ case PED_EXCEPTION_UNHANDLED:
+ ped_exception_catch ();
+ case PED_EXCEPTION_CANCEL:
+ return 0;
+ }
+ }
+
+#ifdef READ_ONLY
+ printf ("ped_device_write (\"%s\", %p, %d, %d)\n",
+ dev->path, buffer, (int) start, (int) count);
+#else
+ dev->dirty = 1;
+ while(1)
+ {
+ status = write (arch_specific->fd, buffer, write_length);
+ if (status == count * dev->sector_size)
+ break;
+
+ if (status > 0)
+ {
+ write_length -= status;
+ buffer += status;
+ continue;
+ }
+
+ ex_status = ped_exception_throw (
+ PED_EXCEPTION_ERROR,
+ PED_EXCEPTION_RETRY_IGNORE_CANCEL,
+ _("%s during write on %s"),
+ strerror (errno), dev->path);
+
+ switch (ex_status)
+ {
+ case PED_EXCEPTION_IGNORE:
+ return 1;
+ case PED_EXCEPTION_RETRY:
+ break;
+ case PED_EXCEPTION_UNHANDLED:
+ ped_exception_catch ();
+ case PED_EXCEPTION_CANCEL:
+ return 0;
+ }
+ }
+#endif /* !READ_ONLY */
+
+ return 1;
+}
+
+static PedSector astral_check (PedDevice* dev, void* buffer, PedSector start, PedSector count)
+{
+ struct astral_specific* arch_specific = ASTRAL_SPECIFIC(dev);
+ PedSector done = 0;
+ int status;
+
+ PED_ASSERT(dev != NULL);
+
+ if (lseek(arch_specific->fd, start * dev->sector_size, SEEK_SET)
+ != start * dev->sector_size)
+ return 0;
+
+ for (done = 0; done < count; done += status / dev->sector_size)
+ {
+ status = read (arch_specific->fd, buffer,
+ (size_t) ((count-done) * dev->sector_size));
+ if (status < 0)
+ break;
+ }
+
+ return done;
+}
+
+static int astral_sync (PedDevice* dev)
+{
+ if (dev->read_only)
+ return 1;
+ if (!_do_fsync (dev))
+ return 0;
+
+ return 1;
+}
+
+/* Probe for all available disks */
+static void astral_probe_all(void) {
+ DIR *dir = opendir("/dev/");
+ if (!dir)
+ return;
+
+ struct dirent *dent = readdir(dir);
+ struct stat stat;
+ while (dent) {
+ char full_path[100];
+ snprintf(full_path, 100, "/dev/%s", dent->d_name);
+ if (stat(full_path, &stat) == 0 && S_ISBLK(stat.st_mode) && major(stat.st_rdev) == 7) {
+ // figure out if this is a disk
+ int f = open(full_path, O_RDONLY);
+ struct astral_blockdesc desc = {0};
+ if (ioctl(f, BLOCK_IOCTL_GETDESC, &desc) == 0 && desc.type == BLOCK_TYPE_DISK)
+ _ped_device_probe(full_path);
+ }
+
+ dent = readdir(dir);
+ }
+
+ closedir(dir);
+}
+
+static char* astral_partition_get_path (const PedPartition* part)
+{
+ return NULL;
+}
+
+static int astral_partition_is_busy (const PedPartition* part)
+{
+ return 0;
+}
+
+static int astral_disk_commit (PedDisk* disk)
+{
+ return 0;
+}
+
+static PedDeviceArchOps astral_dev_ops = {
+ _new: astral_new,
+ destroy: astral_destroy,
+ is_busy: astral_is_busy,
+ open: astral_open,
+ refresh_open: astral_refresh_open,
+ close: astral_close,
+ refresh_close: astral_refresh_close,
+ read: astral_read,
+ write: astral_write,
+ check: astral_check,
+ sync: astral_sync,
+ sync_fast: astral_sync,
+ probe_all: astral_probe_all
+};
+
+static PedDiskArchOps astral_disk_ops = {
+ partition_get_path: astral_partition_get_path,
+ partition_is_busy: astral_partition_is_busy,
+ disk_commit: astral_disk_commit
+};
+
+PedArchitecture ped_astral_arch = {
+ dev_ops: &astral_dev_ops,
+ disk_ops: &astral_disk_ops
+};
diff --git parted-clean/libparted/architecture.c parted-workdir/libparted/architecture.c
index 4020f98..0126e39 100644
--- parted-clean/libparted/architecture.c
+++ parted-workdir/libparted/architecture.c
@@ -34,6 +34,9 @@ ped_set_architecture ()
#elif defined(__BEOS__)
extern PedArchitecture ped_beos_arch;
const PedArchitecture* arch = &ped_beos_arch;
+#elif defined(__astral__)
+ extern PedArchitecture ped_astral_arch;
+ const PedArchitecture* arch = &ped_astral_arch;
#else
extern PedArchitecture ped_gnu_arch;
const PedArchitecture* arch = &ped_gnu_arch;
diff --git parted-clean/libparted/libparted.c parted-workdir/libparted/libparted.c
index 204ce00..1b72255 100644
--- parted-clean/libparted/libparted.c
+++ parted-workdir/libparted/libparted.c
@@ -76,7 +76,6 @@ extern void ped_disk_pc98_init ();
extern void ped_disk_sun_init ();
extern void ped_disk_amiga_init ();
extern void ped_disk_dasd_init ();
-extern void ped_disk_atari_init ();
static void
init_disk_types ()
@@ -87,7 +86,6 @@ init_disk_types ()
#if defined __s390__ || defined __s390x__
ped_disk_dasd_init();
#endif
- ped_disk_atari_init (); /* easy false positives, so probe others first */
ped_disk_sun_init ();
#ifdef ENABLE_PC98
ped_disk_pc98_init ();
@@ -146,7 +144,6 @@ extern void ped_disk_pc98_done ();
extern void ped_disk_sun_done ();
extern void ped_disk_amiga_done ();
extern void ped_disk_dasd_done ();
-extern void ped_disk_atari_done ();
static void
done_disk_types ()
@@ -166,7 +163,6 @@ done_disk_types ()
ped_disk_bsd_done ();
ped_disk_amiga_done ();
ped_disk_aix_done ();
- ped_disk_atari_done ();
}
static void _init() __attribute__ ((constructor));
diff --git parted-clean/libparted/unit.c parted-workdir/libparted/unit.c
index a63b98d..01f46fb 100644
--- parted-clean/libparted/unit.c
+++ parted-workdir/libparted/unit.c
@@ -248,7 +248,7 @@ ped_unit_format_custom_byte (const PedDevice* dev, PedSector byte, PedUnit unit)
(w < 100.) ? 1 :
0 ;
-#ifdef __BEOS__
+#if defined(__BEOS__) || defined(__astral__)
snprintf (buf, 100, "%.*f%s", p, d, ped_unit_get_name(unit));
#else
snprintf (buf, 100, "%1$.*2$f%3$s", d, p, ped_unit_get_name (unit));
+31 -4
View File
@@ -1,7 +1,8 @@
diff -ruN readline-clean/support/config.sub readline/support/config.sub
--- readline-clean/support/config.sub 2022-10-14 16:21:57.553229749 -0300
+++ readline/support/config.sub 2022-10-14 16:22:12.479896273 -0300
@@ -1723,7 +1723,7 @@
diff --git readline-clean/support/config.sub readline-workdir/support/config.sub
index 9b62e37..12d8ea2 100644
--- readline-clean/support/config.sub
+++ readline-workdir/support/config.sub
@@ -1723,7 +1723,7 @@ case $os in
# Now accept the basic system types.
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
@@ -10,3 +11,29 @@ diff -ruN readline-clean/support/config.sub readline/support/config.sub
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
diff --git readline-clean/support/shlib-install readline-workdir/support/shlib-install
index 661355d..8c14919 100644
--- readline-clean/support/shlib-install
+++ readline-workdir/support/shlib-install
@@ -118,7 +118,7 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
# Create symlinks to the installed library. This section is incomplete.
#
case "$host_os-$host_vendor" in
-*linux*|freebsd*|dragonfly*)
+*linux*|freebsd*|dragonfly*|astral*)
# libname.so.M -> libname.so.M.N
${echo} ${RM} ${INSTALLDIR}/$LINK2
if [ -z "$uninstall" ]; then
diff --git readline-clean/support/shobj-conf readline-workdir/support/shobj-conf
index cd7634d..c72d34a 100644
--- readline-clean/support/shobj-conf
+++ readline-workdir/support/shobj-conf
@@ -123,7 +123,7 @@ sunos5*|solaris2*)
;;
# All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd.
-linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*)
+linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*|astral*)
SHOBJ_CFLAGS=-fPIC
SHOBJ_LD='${CC}'
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
@@ -0,0 +1,33 @@
diff --git util-linux-clean/Makefile.am util-linux-workdir/Makefile.am
index 01e9970..7660be9 100644
--- util-linux-clean/Makefile.am
+++ util-linux-workdir/Makefile.am
@@ -84,7 +84,7 @@ EXTRA_DIST =
CLEANFILES =
DISTCLEANFILES =
-SUBDIRS = po
+SUBDIRS = #po
RCS_FIND_IGNORE = \( -name SCCS -o -name BitKeeper -o -name .svn -o \
-name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o
@@ -120,7 +120,6 @@ include lsfd-cmd/Makemodule.am
include pam_lastlog2/Makemodule.am
include bash-completion/Makemodule.am
include man-common/Makemodule.am
-include po-man/Makemodule.am
include Documentation/Makemodule.am
include tests/Makemodule.am
diff --git util-linux-clean/configure.ac util-linux-workdir/configure.ac
index d1c1840..a860cc9 100644
--- util-linux-clean/configure.ac
+++ util-linux-workdir/configure.ac
@@ -3110,7 +3110,6 @@ libmount/src/libmount.h
libsmartcols/docs/Makefile
libsmartcols/docs/version.xml
libsmartcols/src/libsmartcols.h
-po/Makefile.in
])
AC_OUTPUT
-30
View File
@@ -1,30 +0,0 @@
diff --git xz-clean/src/xz/message.c xz-workdir/src/xz/message.c
index abf30ad..4331696 100644
--- xz-clean/src/xz/message.c
+++ xz-workdir/src/xz/message.c
@@ -149,8 +149,8 @@ message_init(void)
sa.sa_handler = &progress_signal_handler;
for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
- if (sigaction(message_progress_sigs[i], &sa, NULL))
- message_signal_handler();
+ if (sigaction(message_progress_sigs[i], &sa, NULL)) ;
+ //message_signal_handler();
#endif
return;
diff --git xz-clean/src/xz/signals.c xz-workdir/src/xz/signals.c
index 7aef463..6ea2540 100644
--- xz-clean/src/xz/signals.c
+++ xz-workdir/src/xz/signals.c
@@ -105,8 +105,8 @@ signals_init(void)
continue;
// Establish the signal handler.
- if (sigaction(sigs[i], &my_sa, NULL))
- message_signal_handler();
+ if (sigaction(sigs[i], &my_sa, NULL)) ;
+ // message_signal_handler();
}
signals_are_initialized = true;
+3 -3
View File
@@ -2,11 +2,11 @@ name=e2fsprogs
revision=1
from_source=e2fsprogs
imagedeps="build-essential"
hostdeps="xgcc xbinutils"
deps="base"
hostdeps="xgcc xbinutils pkgconfig libtool"
deps="base libuuid"
configure() {
${source_dir}/configure --host=x86_64-astral --prefix=${prefix}
${source_dir}/configure --host=x86_64-astral --prefix=${prefix} --disable-libuuid
}
build() {
+26
View File
@@ -0,0 +1,26 @@
name=libuuid
revision=1
from_source=util-linux
imagedeps="build-essential python3 python3-dev"
hostrundeps="automake autoconf xgcc xbinutils libstdc++-v3 pkgconfig libtool"
deps="base gmp mpfr mpc binutils python"
configure() {
cp -rp ${source_dir}/* .
rm -rf po
#./configure --host=x86_64-astral --prefix=${prefix} --enable-libuuid --enable-elf-shlibs --enable-subset
./configure --host=x86_64-astral --prefix=${prefix} --enable-libuuid --disable-all-programs --enable-po --disable-nls --disable-static
}
#build() {
# make -j ${parallelism} libuuid.la
#}
package() {
make DESTDIR="${dest_dir}" install
mv -v ${dest_dir}/lib/* ${dest_dir}/${prefix}/lib
rm -r ${dest_dir}/lib
rm ${dest_dir}/${prefix}/lib/libuuid.so{,.1}
ln -sv libuuid.so.1.3.0 ${dest_dir}/${prefix}/lib/libuuid.so.1
ln -sv libuuid.so.1 ${dest_dir}/${prefix}/lib/libuuid.so
}
+14
View File
@@ -0,0 +1,14 @@
name=meson
from_source=meson
revision=1
hostdeps="python"
deps="base"
build() {
cp -rp ${source_dir}/* .
}
package() {
/usr/bin/env python3 setup.py install --prefix=${prefix} --root=${dest_dir}
sed -i -e 's/\/usr\/local\/bin\/python3/\/usr\/bin\/env python3/g' ${dest_dir}/${prefix}/bin/meson
}
+23
View File
@@ -0,0 +1,23 @@
name=ninja
from_source=ninja
revision=1
hostdeps="xgcc xbinutils pkgconfig libstdc++-v3"
imagedeps="build-essential python3"
deps="base"
configure() {
CC=x86_64-astral-gcc CXX=x86_64-astral-g++ LD=x86_64-astral-g++ python3 ${source_dir}/configure.py --verbose --platform astral --host astral
}
build() {
ninja
}
package() {
mkdir -p ${dest_dir}/${prefix}/bin/
mkdir -p ${dest_dir}/${prefix}/share/bash-completion/completions
mkdir -p ${dest_dir}/${prefix}/share/zsh/site-functions
install -vm755 ninja ${dest_dir}/${prefix}/bin/ninja
install -vDm644 ${source_dir}/misc/bash-completion ${dest_dir}/${prefix}/share/bash-completion/completions/ninja
install -vDm644 ${source_dir}/misc/zsh-completion ${dest_dir}/${prefix}/share/zsh/site-functions/_ninja
}
+19
View File
@@ -0,0 +1,19 @@
name=parted
revision=1
from_source=parted
imagedeps="build-essential"
hostdeps="xgcc xbinutils pkgconfig libtool"
deps="base ncurses libuuid readline"
configure() {
cp -rp ${source_dir}/* .
./configure --host=x86_64-astral --prefix=${prefix} --disable-device-mapper --disable-nls --enable-shared --disable-static
}
build() {
make -j ${parallelism}
}
package() {
make install DESTDIR=${dest_dir}
}
+2 -2
View File
@@ -3,12 +3,12 @@ revision=1
from_source=python
imagedeps="build-essential zlib1g-dev"
hostdeps="xgcc xbinutils pkgconfig python"
deps="base"
deps="base zlib"
configure() {
echo "ac_cv_file__dev_ptmx=yes" > /tmp/configsite
echo "ac_cv_file__dev_ptc=no" >> /tmp/configsite
CONFIG_SITE=/tmp/configsite ${source_dir}/configure --prefix=${prefix} --host=x86_64-astral --build=x86_64 --with-build-python=python3 --disable-ipv6 --enable-shared
CONFIG_SITE=/tmp/configsite ${source_dir}/configure --prefix=${prefix} --host=x86_64-astral --build=x86_64 --disable-ipv6 --enable-shared
}
build() {
+1 -1
View File
@@ -2,7 +2,7 @@ name=readline
revision=1
from_source=readline
imagedeps="build-essential"
hostdeps="xgcc xbinutils"
hostdeps="xgcc xbinutils libtool pkgconfig"
deps="base ncurses"
configure() {
+18
View File
@@ -0,0 +1,18 @@
name=xz
revision=1
from_source=xz
imagedeps="build-essential"
hostdeps="xgcc xbinutils pkgconfig libtool"
deps="base"
configure() {
${source_dir}/configure --host=x86_64-astral --prefix=${prefix} --disable-static
}
build() {
make -j ${parallelism}
}
package() {
make install DESTDIR=${dest_dir}
}
+2 -2
View File
@@ -1,8 +1,8 @@
name=frigg
version=91ada7d4e12b9e73a454e7be13919e989444faa2
version=f44b5e821c7d83fbe5189850045f262d544acd8b
source_method=tarball
tarball_url="https://github.com/managarm/frigg/archive/${version}.tar.gz"
tarball_sha512=d7011bcb0b2adfe88968de7cf9080fc71664725784491e66266b34b7fd83c2e3005f8ba7b530116075a7f5f7b31103af9aef1b32dab3143ed9ae3a247d2aa655
tarball_sha512=56b5d134630dd653db063bdc6f4ea7f48f7a106f28315acbaea4008b064a52794abd9a8251d5551a50de94b65be5670499ab3fc63f184947871ebe09e955a9c3
prepare() {
true
+9
View File
@@ -0,0 +1,9 @@
name=meson
version=1.9.0
source_method=tarball
tarball_url="https://github.com/mesonbuild/meson/archive/refs/tags/${version}.tar.gz"
tarball_sha512=ecd69b6734be14c467f7db67dd88c0e57ebfad83ce3ddada131ff3e43ac964523e1083d7c7f3803033a9a76adbc32ad26dd2e3aca69884269000ca64130bde07
prepare() {
true
}
+9
View File
@@ -0,0 +1,9 @@
name=ninja
version=1.13.1
source_method=tarball
tarball_url="https://github.com/ninja-build/ninja/archive/refs/tags/v${version}.tar.gz"
tarball_sha512=ec94d42967b962d66ab0747fcb9d095510117159de0473ec08df47a657895aa2523f920798e4608d0c6cf0e2e382512c14aec8a54ea58b6cd4b01edd3a7c8e62
prepare() {
true
}
+10
View File
@@ -0,0 +1,10 @@
name=parted
version=3.6
source_method=tarball
tarball_url="https://ftpmirror.gnu.org/gnu/parted/parted-${version}.tar.xz"
tarball_sha512=034a44b25718acba175212019d24f092972a791c5bd1d921ae91e17478657a77c5c5dd0c832bed7968c3a07ec6c65c0785acfac2f90c1ca5e1692f3c141693ef
hostdeps="libtool automake autoconf pkgconfig"
prepare() {
cp -v $(find /usr/local/share/automake* -name config.sub) build-aux
}
+10
View File
@@ -0,0 +1,10 @@
name=util-linux
version=2.41.1
source_method=tarball
tarball_url="https://github.com/util-linux/util-linux/archive/refs/tags/v${version}.tar.gz"
tarball_sha512="cada3b2c4b19be00265bd984fe74d49d75a62e14be8df89010068ee65022c252eeb08b98ec1cdf1951e2981ea3864f1837428cb089f1c2317fe2fd44d8135bcc"
hostdeps="automake autoconf libtool pkgconfig"
prepare() {
autoreconf -fvi
}
+10
View File
@@ -0,0 +1,10 @@
name=xz
version=5.8.1
source_method=tarball
tarball_url="https://github.com/tukaani-project/xz/releases/download/v${version}/xz-${version}.tar.gz"
tarball_sha512=151b2a47fdf00274c4fd71ceada8fb6c892bdac44070847ebf3259e602b97c95ee5ee88974e03d7aa821ab4f16d5c38e50dfb2baf660cf39c199878a666e19ad
hostdeps="autoconf automake libtool pkgconfig"
prepare() {
autoreconf -fvi
}