| author | Scott Howard <showard@debian.org> | |
| Tue, 27 Dec 2011 17:34:49 +0000 (12:34 -0500) | ||
| committer | Scott Howard <showard@debian.org> | |
| Tue, 27 Dec 2011 17:34:49 +0000 (12:34 -0500) |
specefic checker in debian/permission-checker instead (written in
java as to pull in no extra dependencies).
java as to pull in no extra dependencies).
| debian/README.Debian | [new file with mode: 0644] | patch | blob |
| debian/README.source | [deleted file] | patch | blob | history |
| debian/arduino.install | patch | blob | history | |
| debian/changelog | patch | blob | history | |
| debian/clean | [new file with mode: 0644] | patch | blob |
| debian/control | patch | blob | history | |
| debian/patches/permission_fix.patch | patch | blob | history | |
| debian/permission-checker/arduinopc.java | [new file with mode: 0644] | patch | blob |
| debian/rules | patch | blob | history |
diff --git a/debian/README.Debian b/debian/README.Debian
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,9 @@
+User must be in the dialout group in order to write to USB/Serial ports.
+
+Fedora uses zenity to ask if a user wants to be added, but it is a big download.
+
+I wrote our own java code, in debian/permission-checker, which will ask if the
+user would like to be added, then runs a script with pkexec to add the user
+to the dialout group.
+
+--Scott Howard <showard@debian.org>, Dec 12, 2011
diff --git a/debian/README.source b/debian/README.source
--- a/debian/README.source
+++ /dev/null
@@ -1,7 +0,0 @@
-This package gets its source from a combination of the upstream SVN and
-upstream released tarball, please inspect the rules file's get-orig-source
-target. Both are found at http://arduino.cc/en/Main/Software. This package
-follows what would happen in the make.sh and dist.sh scripts in a Debian
-compliant way.
-
-Patches are described in debian/patches directly.
diff --git a/debian/arduino.install b/debian/arduino.install
--- a/debian/arduino.install
+++ b/debian/arduino.install
debian/icons/* usr/share/icons/hicolor
debian/dist/arduino-add-groups /usr/bin
debian/dist/cc.arduino.add-groups.policy /usr/share/polkit-1/actions
+arduinopc.jar usr/share/arduino/
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
arduino (1:1.0+dfsg-4) unstable; urgency=low
- * zenity and policykit moved to Recommends. Package can be configured
- and work without zenity and policykit (Closes: #653295)
+ * policykit moved to Recommends. Package can be configured
+ and work without policykit (Closes: #653295)
+ * Dependency on zenity removed (Closes: #653296). Uses Debian
+ specefic checker in debian/permission-checker instead (written in
+ java as to pull in no extra dependencies).
- -- Scott Howard <showard@debian.org> Mon, 26 Dec 2011 22:35:34 -0500
+ -- Scott Howard <showard@debian.org> Tue, 27 Dec 2011 12:21:24 -0500
arduino (1:1.0+dfsg-3) unstable; urgency=low
diff --git a/debian/clean b/debian/clean
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+arduinopc.jar
diff --git a/debian/control b/debian/control
--- a/debian/control
+++ b/debian/control
Depends: default-jre | java6-runtime, libjna-java,
librxtx-java (>= 2.2pre2-3), ${misc:Depends},
arduino-core (= ${binary:Version})
-Recommends: extra-xdg-menus, policykit-1, zenity
+Recommends: extra-xdg-menus, policykit-1
Description: AVR development board IDE and built-in libraries
Arduino is an open-source electronics prototyping platform based on
flexible, easy-to-use hardware and software. It's intended for artists,
Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652523
Index: arduino/build/linux/dist/arduino
===================================================================
---- arduino.orig/build/linux/dist/arduino 2011-12-23 10:52:18.581468273 -0500
-+++ arduino/build/linux/dist/arduino 2011-12-23 10:52:54.197469119 -0500
-@@ -1,4 +1,19 @@
+--- arduino.orig/build/linux/dist/arduino 2011-12-27 12:17:18.675536651 -0500
++++ arduino/build/linux/dist/arduino 2011-12-27 12:17:29.255536904 -0500
+@@ -1,4 +1,18 @@
-#!/bin/sh
+#!/bin/bash
+
+ fi
+ done
+
-+ if [[ -n $missing_groups ]] && zenity --title=Arduino --window-icon=/usr/share/icons/hicolor/48x48/apps/arduino.png --question --text "You need to be a member of the following groups to upload code to an Arduino microcontroller over the USB or serial ports:\n$missing_groups" --ok-label='Add' --cancel-label='Ignore'; then
-+ pkexec /usr/bin/arduino-add-groups \
-+ && zenity --title=Arduino --window-icon=/usr/share/icons/hicolor/48x48/apps/arduino.png --info --text "You must log out and log in again before any changes will take effect."
++ if [[ -n $missing_groups ]] && ! java -jar /usr/share/arduino/arduinopc.jar; then
++ pkexec /usr/bin/arduino-add-groups
+ fi
+fi
+
diff --git a/debian/permission-checker/arduinopc.java b/debian/permission-checker/arduinopc.java
--- /dev/null
@@ -0,0 +1,72 @@
+//javac Example.java
+//jar cfe Example.jar Example *.class
+//java -jar Example.jar
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.JLabel;
+import javax.swing.SwingUtilities;
+
+
+public class arduinopc extends JFrame {
+
+ public arduinopc() {
+ initUI();
+ }
+
+ public final void initUI() {
+
+ JPanel panel = new JPanel();
+ getContentPane().add(panel);
+
+// panel.setLayout(null);
+
+ JButton ignoreButton = new JButton("Ignore");
+ //ignoreButton.setBounds(50, 60, 80, 30);
+ ignoreButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent event) {
+ System.exit(0);
+ }
+ });
+
+ JButton addButton = new JButton("Add");
+ //addButton.setBounds(150, 60, 80, 30);
+ addButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent event) {
+ System.exit(1);
+ }
+ });
+
+ //JLabel label = new JLabel("<html>You need to be a member of the \"dailout\"<br>group to upload code to an Arduino<br>microcontroller over the USB or<br>serial ports.<br></html>");
+ //label.setBounds(10,10,300,100);
+ panel.add(new JLabel("<html>You need to be added to the \"dailout\"<br>group to upload code to an Arduino<br>microcontroller over the USB or<br>serial ports.<br><br>You must log out and log in again<br>before any group changes<br>will take effect.</html>", JLabel.CENTER));
+ //label.setFont(new Font("Georgia", Font.PLAIN, 14));
+ //label.setForeground(new Color(50, 50, 25));
+//label.setOpaque(true);
+
+
+ //panel.add(label);//, BorderLayout.CENTER);
+ panel.add(ignoreButton);
+ panel.add(addButton);
+
+
+
+ setTitle("Arduino Permission Checker");
+ setSize(300, 200);
+ setLocationRelativeTo(null);
+ setDefaultCloseOperation(EXIT_ON_CLOSE);
+ }
+
+ public static void main(String[] args) {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ arduinopc ex = new arduinopc();
+ ex.setVisible(true);
+ }
+ });
+ }
+}
diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
rm -rf build/linux/work/hardware/tools
cd core/methods && ant clean
cd build && ant clean
+ rm -f debian/permission-checker/*.class
dh_clean
override_jh_build:
cd core/methods && ant
cd build && ant
rm -f build/linux/work/lib/version.txt && echo $(SVNTAG) > build/linux/work/lib/version.txt #comment out after beta
+ javac debian/permission-checker/arduinopc.java
+ cd debian/permission-checker && jar cfe arduinopc.jar arduinopc *.class
+ mv debian/permission-checker/*.jar .
override_dh_installchangelogs:
