automatic version update by autodist [release 3.5-1mamba;Sat Mar 11 2023]
This commit is contained in:
parent
4f513d36f3
commit
60ba8276f3
@ -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 },
|
74
parted.spec
74
parted.spec
@ -1,10 +1,9 @@
|
||||
### AUTOUPDATE-OFF: 2
|
||||
%define pyb_ver 0.11.2
|
||||
%define with_python_binding 1
|
||||
%define libname lib%{name}
|
||||
|
||||
Name: parted
|
||||
Version: 3.4
|
||||
Version: 3.5
|
||||
Release: 1mamba
|
||||
Summary: Tools for creating, destroying, resizing, checking and copying partitions
|
||||
Group: System/Tools
|
||||
@ -13,34 +12,24 @@ Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://www.gnu.org/software/parted/
|
||||
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
|
||||
Patch2: %{name}-1.8.8-readline.patch
|
||||
Patch3: %{name}-1.8.6-disk_sun_raid.patch
|
||||
Patch4: %{name}-2.4-kernel-3.0.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: bash
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: libblkid-devel
|
||||
BuildRequires: libdevmapper-devel
|
||||
BuildRequires: libe2fs-devel
|
||||
BuildRequires: libncurses-devel
|
||||
BuildRequires: libreadline-devel
|
||||
%if "%{stage1}" != "1"
|
||||
BuildRequires: libselinux-devel
|
||||
%endif
|
||||
BuildRequires: libsepol-devel
|
||||
BuildRequires: texinfo
|
||||
BuildRequires: libuuid-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: libreiserfs-devel >= 0.3.0.4
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: libcheck-devel
|
||||
Requires(post):%{__install_info}
|
||||
Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
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
|
||||
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 package contains static libraries and header files needed for development.
|
||||
|
||||
This package contains static libraries and header files need for development.
|
||||
|
||||
%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
|
||||
%debug_package
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
@ -89,11 +65,6 @@ This module contains Python bindings for the library.
|
||||
#%patch3 -p1
|
||||
#%patch4 -p1
|
||||
|
||||
%if %{with_python_binding}
|
||||
gzip -cd %{S:1} | tar xf -
|
||||
%patch0 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
#autoconf
|
||||
%configure \
|
||||
@ -105,12 +76,6 @@ gzip -cd %{S:1} | tar xf -
|
||||
|
||||
%make
|
||||
|
||||
%if %{with_python_binding}
|
||||
pushd python-%{name}-%{pyb_ver}
|
||||
CFLAGS="-L../lib%{name}/.libs -I../include" %{__python} setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
%makeinstall
|
||||
@ -119,16 +84,6 @@ rm -f %{buildroot}%{_bindir}/label
|
||||
|
||||
%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
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
@ -139,7 +94,6 @@ popd
|
||||
%uninstall_info %{name}.info
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%files -f %{name}.lang
|
||||
@ -149,31 +103,25 @@ popd
|
||||
%{_sbindir}/partprobe
|
||||
%{_infodir}/*
|
||||
%{_mandir}/man8/*
|
||||
%doc AUTHORS BUGS ChangeLog COPYING NEWS README THANKS TODO
|
||||
|
||||
%files -n %{libname}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/%{libname}*.so.*
|
||||
%doc AUTHORS COPYING
|
||||
|
||||
%files -n %{libname}-devel
|
||||
%defattr(-,root,root)
|
||||
%dir %{_includedir}/%{name}
|
||||
%{_includedir}/%{name}/*
|
||||
%{_libdir}/%{libname}*.a
|
||||
%{_libdir}/%{libname}*.la
|
||||
%{_libdir}/%{libname}*.so
|
||||
%{_libdir}/pkgconfig/%{libname}*.pc
|
||||
|
||||
%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
|
||||
%doc BUGS ChangeLog NEWS README THANKS TODO
|
||||
|
||||
%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
|
||||
- automatic version update by autodist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user