automatic version update by autodist [release 3.5-1mamba;Sat Mar 11 2023]

This commit is contained in:
Automatic Build System 2024-01-06 08:25:17 +01:00
parent 4f513d36f3
commit 60ba8276f3
2 changed files with 11 additions and 258 deletions

View File

@ -1,195 +0,0 @@
diff -ru parted-1.6.21/python-parted-0.11.2/parted.py parted-1.6.21-fix/python-parted-0.11.2/parted.py
--- parted-1.6.21/python-parted-0.11.2/parted.py 2002-09-17 19:07:55.000000000 +0000
+++ parted-1.6.21-fix/python-parted-0.11.2/parted.py 2005-03-14 16:21:21.000000000 +0000
@@ -100,7 +100,23 @@
return self.list[i:j]
###############################################################################
-# PEDDEVICE
+# PEDCHSGEOMETRY, PEDDEVICE
+
+class CHSGeometry:
+ def __init__(self, obj):
+ self._o = obj
+
+ # Accessor Methods
+
+ def get_cylinders(self):
+ return _parted.chs_geometry_get_cylinders(self._o)
+
+ def get_heads(self):
+ return _parted.chs_geometry_get_heads(self._o)
+
+ def get_sectors(self):
+ return _parted.chs_geometry_get_sectors(self._o)
+
# Enum DeviceType
DEVICE_UNKNOWN = 0
@@ -143,17 +159,11 @@
def get_sector_size(self):
return _parted.device_get_sector_size(self._o)
- def get_heads(self):
- return _parted.device_get_heads(self._o)
-
- def get_sectors(self):
- return _parted.device_get_sectors(self._o)
-
- def get_cylinders(self):
- return _parted.device_get_cylinders(self._o)
+ def get_hw_geom(self):
+ return CHSGeometry(_parted.device_get_hw_geom(self._o))
- def get_geom_known(self):
- return _parted.device_get_geom_known(self._o)
+ def get_bios_geom(self):
+ return CHSGeometry(_parted.device_get_bios_geom(self._o))
def get_host(self):
return _parted.device_get_host(self._o)
diff -ru parted-1.6.21/python-parted-0.11.2/pyparted.c parted-1.6.21-fix/python-parted-0.11.2/pyparted.c
--- parted-1.6.21/python-parted-0.11.2/pyparted.c 2002-09-17 22:12:37.000000000 +0000
+++ parted-1.6.21-fix/python-parted-0.11.2/pyparted.c 2005-03-14 16:33:47.000000000 +0000
@@ -128,91 +128,104 @@
}
static PyObject *
-device_get_model(PyObject *self, PyObject *args)
+chs_geometry_get_cylinders(PyObject *self, PyObject *args)
{
PyPartedObject *o;
if (!PyArg_ParseTuple(args, "O", &o))
return NULL;
- return PyString_FromString(((PedDevice *)o->obj)->model);
+ return PyInt_FromLong(((PedCHSGeometry *)o->obj)->cylinders);
}
static PyObject *
-device_get_path(PyObject *self, PyObject *args)
+chs_geometry_get_heads(PyObject *self, PyObject *args)
{
PyPartedObject *o;
if (!PyArg_ParseTuple(args, "O", &o))
return NULL;
- return PyString_FromString(((PedDevice *)o->obj)->path);
+ return PyInt_FromLong(((PedCHSGeometry *)o->obj)->heads);
}
static PyObject *
-device_get_type(PyObject *self, PyObject *args)
+chs_geometry_get_sectors(PyObject *self, PyObject *args)
{
PyPartedObject *o;
if (!PyArg_ParseTuple(args, "O", &o))
return NULL;
- return PyInt_FromLong(((PedDevice *)o->obj)->type);
+ return PyInt_FromLong(((PedCHSGeometry *)o->obj)->sectors);
}
static PyObject *
-device_get_sector_size(PyObject *self, PyObject *args)
+device_get_model(PyObject *self, PyObject *args)
{
PyPartedObject *o;
if (!PyArg_ParseTuple(args, "O", &o))
return NULL;
- return PyInt_FromLong(((PedDevice *)o->obj)->sector_size);
+ return PyString_FromString(((PedDevice *)o->obj)->model);
}
static PyObject *
-device_get_heads(PyObject *self, PyObject *args)
+device_get_path(PyObject *self, PyObject *args)
{
PyPartedObject *o;
if (!PyArg_ParseTuple(args, "O", &o))
return NULL;
- return PyInt_FromLong(((PedDevice *)o->obj)->heads);
+ return PyString_FromString(((PedDevice *)o->obj)->path);
}
static PyObject *
-device_get_sectors(PyObject *self, PyObject *args)
+device_get_type(PyObject *self, PyObject *args)
{
PyPartedObject *o;
if (!PyArg_ParseTuple(args, "O", &o))
return NULL;
- return PyInt_FromLong(((PedDevice *)o->obj)->sectors);
+ return PyInt_FromLong(((PedDevice *)o->obj)->type);
+}
+
+static PyObject *
+device_get_sector_size(PyObject *self, PyObject *args)
+{
+ PyPartedObject *o;
+
+ if (!PyArg_ParseTuple(args, "O", &o))
+ return NULL;
+
+ return PyInt_FromLong(((PedDevice *)o->obj)->sector_size);
}
static PyObject *
-device_get_cylinders(PyObject *self, PyObject *args)
+device_get_hw_geom(PyObject *self, PyObject *args)
{
PyPartedObject *o;
if (!PyArg_ParseTuple(args, "O", &o))
return NULL;
- return PyInt_FromLong(((PedDevice *)o->obj)->cylinders);
+ return PyPartedObject_new("PedCHSGeometry",
+ &((PedDevice *)o->obj)->hw_geom);
}
static PyObject *
-device_get_geom_known(PyObject *self, PyObject *args)
+device_get_bios_geom(PyObject *self, PyObject *args)
{
PyPartedObject *o;
if (!PyArg_ParseTuple(args, "O", &o))
return NULL;
- return PyInt_FromLong(((PedDevice *)o->obj)->geom_known);
+ return PyPartedObject_new("PedCHSGeometry",
+ &((PedDevice *)o->obj)->bios_geom);
}
static PyObject *
@@ -1248,15 +1261,16 @@
static PyMethodDef parted_methods[] = {
{ "init", init, METH_VARARGS, NULL },
+ { "chs_geometry_get_cylinders", chs_geometry_get_cylinders, METH_VARARGS, NULL },
+ { "chs_geometry_get_heads", chs_geometry_get_heads, METH_VARARGS, NULL },
+ { "chs_geometry_get_sectors", chs_geometry_get_sectors, METH_VARARGS, NULL },
{ "device_get_next", device_get_next, METH_VARARGS, NULL },
{ "device_get_model", device_get_model, METH_VARARGS, NULL },
{ "device_get_path", device_get_path, METH_VARARGS, NULL },
{ "device_get_type", device_get_type, METH_VARARGS, NULL },
{ "device_get_sector_size", device_get_sector_size, METH_VARARGS, NULL },
- { "device_get_heads", device_get_heads, METH_VARARGS, NULL },
- { "device_get_sectors", device_get_sectors, METH_VARARGS, NULL },
- { "device_get_cylinders", device_get_cylinders, METH_VARARGS, NULL },
- { "device_get_geom_known", device_get_geom_known, METH_VARARGS, NULL },
+ { "device_get_hw_geom", device_get_hw_geom, METH_VARARGS, NULL },
+ { "device_get_bios_geom", device_get_bios_geom, METH_VARARGS, NULL },
{ "device_get_host", device_get_host, METH_VARARGS, NULL },
{ "device_get_did", device_get_did, METH_VARARGS, NULL },
{ "device_get_length", device_get_length, METH_VARARGS, NULL },

View File

@ -1,10 +1,9 @@
### AUTOUPDATE-OFF: 2 ### AUTOUPDATE-OFF: 2
%define pyb_ver 0.11.2 %define pyb_ver 0.11.2
%define with_python_binding 1
%define libname lib%{name} %define libname lib%{name}
Name: parted Name: parted
Version: 3.4 Version: 3.5
Release: 1mamba Release: 1mamba
Summary: Tools for creating, destroying, resizing, checking and copying partitions Summary: Tools for creating, destroying, resizing, checking and copying partitions
Group: System/Tools Group: System/Tools
@ -13,34 +12,24 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.gnu.org/software/parted/ URL: http://www.gnu.org/software/parted/
Source0: http://ftp.gnu.org/gnu/parted/parted-%{version}.tar.xz Source0: http://ftp.gnu.org/gnu/parted/parted-%{version}.tar.xz
%if %{with_python_binding}
Source1: http://archive.ubuntu.com/ubuntu/pool/main/p/python-parted/python-parted_%{pyb_ver}.tar.gz
Patch0: %{name}-1.6.21-python_parted_0.11.2.patch
%endif
Patch1: %{name}-1.8.6-disk_dos.patch Patch1: %{name}-1.8.6-disk_dos.patch
Patch2: %{name}-1.8.8-readline.patch Patch2: %{name}-1.8.8-readline.patch
Patch3: %{name}-1.8.6-disk_sun_raid.patch Patch3: %{name}-1.8.6-disk_sun_raid.patch
Patch4: %{name}-2.4-kernel-3.0.patch Patch4: %{name}-2.4-kernel-3.0.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: bash
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libblkid-devel
BuildRequires: libdevmapper-devel BuildRequires: libdevmapper-devel
BuildRequires: libe2fs-devel
BuildRequires: libncurses-devel BuildRequires: libncurses-devel
BuildRequires: libreadline-devel BuildRequires: libreadline-devel
%if "%{stage1}" != "1" BuildRequires: libuuid-devel
BuildRequires: libselinux-devel
%endif
BuildRequires: libsepol-devel
BuildRequires: texinfo
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: libreiserfs-devel >= 0.3.0.4 BuildRequires: libreiserfs-devel >= 0.3.0.4
BuildRequires: gettext-devel BuildRequires: gettext-devel
BuildRequires: libcheck-devel BuildRequires: libcheck-devel
Requires(post):%{__install_info} Requires(post):%{__install_info}
Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release} Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
GNU Parted is a program for creating, destroying, resizing, checking and copying partitions, and the filesystems on them. GNU Parted is a program for creating, destroying, resizing, checking and copying partitions, and the filesystems on them.
@ -65,22 +54,9 @@ Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
GNU Parted is a program for creating, destroying, resizing, checking and GNU Parted is a program for creating, destroying, resizing, checking and
copying partitions, and the filesystems on them. copying partitions, and the filesystems on them.
This is useful for creating space for new operating systems, reorganising disk usage, copying data between hard disks, and disk imaging. This is useful for creating space for new operating systems, reorganising disk usage, copying data between hard disks, and disk imaging.
This package contains static libraries and header files needed for development.
This package contains static libraries and header files need for development. %debug_package
%if %{with_python_binding}
%package python
Group: Development/Libraries/Python
Summary: Python bindings for GNU parted
Requires: python >= %{pyver}
Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
%description python
GNU Parted is a program for creating, destroying, resizing, checking and copying partitions, and the filesystems on them.
This is useful for creating space for new operating systems, reorganising disk usage, copying data between hard disks, and disk imaging.
This module contains Python bindings for the library.
%endif
%prep %prep
%setup -q %setup -q
@ -89,11 +65,6 @@ This module contains Python bindings for the library.
#%patch3 -p1 #%patch3 -p1
#%patch4 -p1 #%patch4 -p1
%if %{with_python_binding}
gzip -cd %{S:1} | tar xf -
%patch0 -p1
%endif
%build %build
#autoconf #autoconf
%configure \ %configure \
@ -105,12 +76,6 @@ gzip -cd %{S:1} | tar xf -
%make %make
%if %{with_python_binding}
pushd python-%{name}-%{pyb_ver}
CFLAGS="-L../lib%{name}/.libs -I../include" %{__python} setup.py build
popd
%endif
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall %makeinstall
@ -119,16 +84,6 @@ rm -f %{buildroot}%{_bindir}/label
%find_lang %{name} %find_lang %{name}
%if %{with_python_binding}
pushd python-%{name}-%{pyb_ver}
%{__python} setup.py install \
--root=%{buildroot} \
--install-headers=%{_includedir}/python \
--install-lib=%{python_sitearch}
chmod 644 {AUTHORS,README,TODO}
popd
%endif
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -139,7 +94,6 @@ popd
%uninstall_info %{name}.info %uninstall_info %{name}.info
%post -n %{libname} -p /sbin/ldconfig %post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig
%files -f %{name}.lang %files -f %{name}.lang
@ -149,31 +103,25 @@ popd
%{_sbindir}/partprobe %{_sbindir}/partprobe
%{_infodir}/* %{_infodir}/*
%{_mandir}/man8/* %{_mandir}/man8/*
%doc AUTHORS BUGS ChangeLog COPYING NEWS README THANKS TODO
%files -n %{libname} %files -n %{libname}
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/%{libname}*.so.* %{_libdir}/%{libname}*.so.*
%doc AUTHORS COPYING
%files -n %{libname}-devel %files -n %{libname}-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/* %{_includedir}/%{name}/*
%{_libdir}/%{libname}*.a %{_libdir}/%{libname}*.a
%{_libdir}/%{libname}*.la
%{_libdir}/%{libname}*.so %{_libdir}/%{libname}*.so
%{_libdir}/pkgconfig/%{libname}*.pc %{_libdir}/pkgconfig/%{libname}*.pc
%doc BUGS ChangeLog NEWS README THANKS TODO
%if %{with_python_binding}
%files python
%defattr(-,root,root)
%{python_sitearch}/_%{name}module.so
%{python_sitearch}/%{name}.py
%{python_sitearch}/%{name}.pyc
%{python_sitearch}/python_parted-*-py*.egg-info
%doc python-%{name}-%{pyb_ver}/{AUTHORS,README,TODO}
%endif
%changelog %changelog
* Sat Mar 11 2023 Automatic Build System <autodist@mambasoft.it> 3.5-1mamba
- automatic version update by autodist
* Thu Jan 28 2021 Automatic Build System <autodist@mambasoft.it> 3.4-1mamba * Thu Jan 28 2021 Automatic Build System <autodist@mambasoft.it> 3.4-1mamba
- automatic version update by autodist - automatic version update by autodist