Merge ~mig-christophe/ubuntu/+source/pmount:ubuntu/focal into ubuntu/+source/pmount:ubuntu/focal

Proposed by Christophe Migliorini
Status: Superseded
Proposed branch: ~mig-christophe/ubuntu/+source/pmount:ubuntu/focal
Merge into: ubuntu/+source/pmount:ubuntu/focal
Diff against target: 127 lines (+80/-0)
8 files modified
.pc/.quilt_patches (+1/-0)
.pc/.quilt_series (+1/-0)
.pc/.version (+1/-0)
.pc/add_support_for_exFAT.patch/.timestamp (+0/-0)
.pc/add_support_for_exFAT.patch/src/fs.c (+63/-0)
.pc/applied-patches (+1/-0)
debian/patches/add_support_for_exFAT.patch (+12/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lucas Kanashiro (community) Needs Fixing
git-ubuntu import Pending
Review via email: mp+460592@code.launchpad.net

This proposal has been superseded by a proposal from 2024-02-22.

Commit message

add support for exFAT (#1524523)

Description of the change

fs.c: add exfat to supported_fs

To post a comment you must log in.
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Hi Christophe,

Thanks for submitting this merge proposal. When we are applying changes to the upstream code in a debian package we cannot modify them directly as you did. Instead, we need to create a patch file inside the debian/patches directory so we can apply the patch during the package build without modifying directly the upstream source code. To create those patch files you can use a tool called quilt [1], the workflow would be:

$ export QUILT_PATCHES=debian/patches
$ quilt new add_support_for_exFAT.patch
$ quilt add src/fs.c
$ quilt edit src/fs.c
# apply your changes and save the file
$ quilt refresh

After those steps you will have the debian/patch/add_support_for_exFAT.patch file.

You also shouldn't add your changes to the upstream ChangeLog but to the debian package one, in debian/changelog. You can use a script called dch [2] to help you with that (you need to install the devscripts package). From the root of the source package do the following:

$ export DEBFULLNAME="Christophe Migliorini"
$ export DEBEMAIL="<your_email_address>"
$ dch -i
# open the debian/changelog file and add what you did. In this case you created the patch above to add support for exFAT. Save the file

With the changes explained above you would have something that is acceptable. I hope the steps above make sense to you.

I am marking this merge proposal as Needs Fixing, the current changes proposed does not work.

[1] https://manpages.ubuntu.com/manpages/noble/man1/quilt.1.html
[2] https://manpages.ubuntu.com/manpages/noble/man1/dch.1.html

review: Needs Fixing
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Once this is fixed, please, subscribe ~ubuntu-sponsors again.

Revision history for this message
Christophe Migliorini (mig-christophe) wrote (last edit ):

Hi Lucas, this is very clear, but for one thing: Am I supposed to commit all `.*` quilt files, and `series` files as well ? Well, I did, it made sense at the time. Let me know...

40582a3... by Christophe Migliorini <email address hidden>

add support for exFAT

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

No, the .pc directory created by quilt should not be commited, sorry. In the end, you need to commit debian/patches/{series,add_support_for_exFAT.patch} and debian/changelog.

Unmerged commits

40582a3... by Christophe Migliorini <email address hidden>

add support for exFAT

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.pc/.quilt_patches b/.pc/.quilt_patches
2new file mode 100644
3index 0000000..6857a8d
4--- /dev/null
5+++ b/.pc/.quilt_patches
6@@ -0,0 +1 @@
7+debian/patches
8diff --git a/.pc/.quilt_series b/.pc/.quilt_series
9new file mode 100644
10index 0000000..c206706
11--- /dev/null
12+++ b/.pc/.quilt_series
13@@ -0,0 +1 @@
14+series
15diff --git a/.pc/.version b/.pc/.version
16new file mode 100644
17index 0000000..0cfbf08
18--- /dev/null
19+++ b/.pc/.version
20@@ -0,0 +1 @@
21+2
22diff --git a/.pc/add_support_for_exFAT.patch/.timestamp b/.pc/add_support_for_exFAT.patch/.timestamp
23new file mode 100644
24index 0000000..e69de29
25--- /dev/null
26+++ b/.pc/add_support_for_exFAT.patch/.timestamp
27diff --git a/.pc/add_support_for_exFAT.patch/src/fs.c b/.pc/add_support_for_exFAT.patch/src/fs.c
28new file mode 100644
29index 0000000..65ea0c7
30--- /dev/null
31+++ b/.pc/add_support_for_exFAT.patch/src/fs.c
32@@ -0,0 +1,63 @@
33+/**
34+ * fs.c - data type and interface function for supported file systems
35+ *
36+ * Author: Martin Pitt <martin.pitt@canonical.com>
37+ * (c) 2004 Canonical Ltd.
38+ *
39+ * This software is distributed under the terms and conditions of the
40+ * GNU General Public License. See file GPL for the full text of the license.
41+ */
42+
43+#include "fs.h"
44+
45+#include <string.h>
46+
47+/**
48+ * List of file systems supported by pmount; terminated with a struct with
49+ * fsname == NULL;
50+ * Do not specify the 'sync' option; this will be dynamically added according
51+ * to command line options. It is anyway better not to use it...
52+ */
53+static struct FS supported_fs[] = {
54+ { "udf", "nosuid,nodev,user", 1, "000", ",iocharset=%s" },
55+ { "iso9660", "nosuid,nodev,user", 1, NULL, ",iocharset=%s" },
56+ { "vfat", "nosuid,nodev,user,quiet,shortname=mixed", 1, "077",
57+ ",iocharset=%s",",fmask=%04o,dmask=%04o"},
58+ { "hfsplus", "nosuid,nodev,user", 1, NULL, 0 },
59+ { "hfs", "nosuid,nodev,user", 1, "077", NULL,
60+ ",file_umask=%04o,dir_umask=%04o"},
61+ { "ext3", "nodev,noauto,nosuid,user,errors=remount-ro", 0, NULL, 0 },
62+ { "ext2", "nodev,noauto,nosuid,user,errors=remount-ro", 0, NULL, 0 },
63+ { "ext4", "nodev,noauto,nosuid,user,errors=remount-ro", 0, NULL, 0 },
64+ { "reiserfs", "nodev,noauto,nosuid,user", 0, NULL, 0 },
65+ { "reiser4", "nodev,noauto,nosuid,user", 0, NULL, 0 },
66+ { "xfs", "nodev,noauto,nosuid,user", 0, NULL, 0 },
67+ { "jfs", "nodev,noauto,nosuid,user,errors=remount-ro", 0, NULL,
68+ ",iocharset=%s"},
69+ { "omfs", "nodev,noauto,nosuid,user", 0, NULL, 0 },
70+ { "ntfs-fuse", "nosuid,nodev,user", 1, "077",
71+ NULL /* no nls support, it seems*/, ",fmask=%04o,dmask=%04o",
72+ 1 /* skip detection */
73+ },
74+ { "ntfs-3g", "nosuid,nodev,user", 1, "077",
75+ NULL /* no nls support, it seems*/, ",fmask=%04o,dmask=%04o",
76+ 1 /* skip detection */
77+ },
78+ { "ntfs", "nosuid,nodev,user", 1, "077", ",nls=%s" },
79+ { NULL, NULL, 0, NULL, 0}
80+};
81+
82+const struct FS*
83+get_supported_fs() {
84+ return supported_fs;
85+}
86+
87+const struct FS*
88+get_fs_info( const char* fsname ) {
89+ struct FS* i;
90+
91+ for( i = supported_fs; i->fsname; ++i )
92+ if( !strcmp( i->fsname, fsname ) )
93+ return i;
94+ return NULL;
95+}
96diff --git a/.pc/applied-patches b/.pc/applied-patches
97new file mode 100644
98index 0000000..59b2c54
99--- /dev/null
100+++ b/.pc/applied-patches
101@@ -0,0 +1 @@
102+add_support_for_exFAT.patch
103diff --git a/debian/patches/add_support_for_exFAT.patch b/debian/patches/add_support_for_exFAT.patch
104new file mode 100644
105index 0000000..baeab90
106--- /dev/null
107+++ b/debian/patches/add_support_for_exFAT.patch
108@@ -0,0 +1,12 @@
109+Index: pmount/src/fs.c
110+===================================================================
111+--- pmount.orig/src/fs.c
112++++ pmount/src/fs.c
113+@@ -23,6 +23,7 @@ static struct FS supported_fs[] = {
114+ { "iso9660", "nosuid,nodev,user", 1, NULL, ",iocharset=%s" },
115+ { "vfat", "nosuid,nodev,user,quiet,shortname=mixed", 1, "077",
116+ ",iocharset=%s",",fmask=%04o,dmask=%04o"},
117++ { "exfat", "nosuid,user,noexec", 1, "077", ",iocharset=%s",",fmask=%04o,dmask=%04o"},
118+ { "hfsplus", "nosuid,nodev,user", 1, NULL, 0 },
119+ { "hfs", "nosuid,nodev,user", 1, "077", NULL,
120+ ",file_umask=%04o,dir_umask=%04o"},
121diff --git a/debian/patches/series b/debian/patches/series
122index e706419..59a5777 100644
123--- a/debian/patches/series
124+++ b/debian/patches/series
125@@ -1 +1,2 @@
126+add_support_for_exFAT.patch
127 01-man-plugdev.diff

Subscribers

People subscribed via source and target branches